Confirmation Window with YES & NO buttons
Hello guys,
I have created on hyperlink into region source of a page which redirect user with maintaining the session something like this :-
Click Me
and this works very much perfect, now my question is when user clicks on the link than he/she should be prompted by a confirmation window only by clicking YES button on that same window user will go to the specified link otherwise not???
how to implement the same confirmation window??? does apex handles those stuffs or I need to implement something else for that???
thxs
regards,
Kumar
Kumar,
I assume that you want user to click "Click Me" link and get prompted for Yes or No. If yes, he/she will be re-directed to a link.
You can add this Javascript to call confirm function -
<script language="JavaScript" type="text/javascript">
<!--
function confirm_response()
var answer = confirm ("Would you like close this record?")
if (answer) {
window.location = "http://www.google.com/"
else {
// do something else
//-->
</script>and on you region's Click Me link, you just simply call above Javascript -
a href='javascript:confirm_response();'
Similar Messages
-
Pop up window with yes & no push buttons
hi
i want to display a pop up window with yes & no push buttons
can anyone help for thisHi,
call function POPUP_TO_CONFIRM
exporting
TITLEBAR = pop_up' (for pop-up header)
TEXT_QUESTION = 'do you want to save data'
TEXT_BUTTON_1 = 'Yes'
ICON_BUTTON_1 = ' '
TEXT_BUTTON_2 = 'No'
ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = ' '
USERDEFINED_F1_HELP = ' '
START_COLUMN = 25
START_ROW = 6
POPUP_TYPE = ' '
IV_QUICKINFO_BUTTON_1 = ' '
IV_QUICKINFO_BUTTON_2 = ' '
importing
ANSWER = ANS
OR.
Use POPUP_TO_DECIDE.
call function 'POPUP_TO_DECIDE'
exporting
defaultoption = '1'
textline1 = text1
textline2 = ' '
textline3 = text-202
text_option1 = 'YES'
text_option2 = 'NO'
titel = text-114
start_column = 15
start_row = 6
cancel_display = ' '
importing
answer = zanswer.
hope this helps.
plz take a look on this function modules also:
POPUP_TO_CONFIRM_LOSS_OF_DATA Create a dialog box in which you make a question whether the user wishes to perform a processing step with loss of data.
POPUP_TO_CONFIRM_STEP Create a dialog box in which you make a question whether the user wishes to perform the step.
POPUP_TO_CONFIRM_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point during an action.
POPUP_TO_CONFIRM_WITH_VALUE Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object.
POPUP_TO_DECIDE Provide user with several choices as radio buttons
POPUP_TO_DECIDE_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point via a diagnosis text.
POPUP_TO_DISPLAY_TEXT Create a dialog box in which you display a two line message
thanx,
dhanashri.
Edited by: Dhanashri Pawar on Aug 19, 2008 2:20 PM
Edited by: Dhanashri Pawar on Aug 19, 2008 2:25 PM
Edited by: Dhanashri Pawar on Aug 19, 2008 2:26 PM -
Create Window with Textbox and Button For getting Input Value
Hi All,
I have create plugin application but i want to take input from user. Therefore i want to create window with textbox and button.
please may i get solution...Or if that's all you need to do, just use JavaScript or a form.
-
Have just tried to open iTunes, and I get a blank window (no dialogue, just a blank window) with an OK button. When I press OK, it closes down (not having opened anything) and shuts down. I've tried opening while holding down the option key, as I would to open with a new iTunes folder, and I"m getting the same empty window with an OK. Very frustrating, has anyone seen this, and can anyone help? Thanks in advance, Kate
so, I called a friend who's more experienced than I am. He walked me through some steps, checking iTunes and we got the same dialogue -free window with the OK button. We then uninstalled iTunes, downloaded it afresh, and it opened with no problems. Seems to all be there, music, tv, etc. Not sure what the issue was, but it has stopped this problem.
-
Stuck Thread when closing dialog window with 'X' browser button
Hello,
I moved my application to JDev 11.1.1.3 and it seems I've got a problem appearing since. Here it is:
I've a bouded task-flow having 5-6 JSP pages.
3 of them can open a dialog window to show a PDF report using dialog:report such as:
<control-flow-rule id="__1">
<from-activity-id id="__2">etats</from-activity-id>
<control-flow-case id="__3">
<from-outcome id="__7">dialog:goReportEtat</from-outcome>
<to-activity-id id="__8">report</to-activity-id>
</control-flow-case>
</control-flow-rule>
<control-flow-rule id="__9">
<from-activity-id id="__10">real</from-activity-id>
<control-flow-case id="__11">
<from-outcome id="__13">dialog:goReportReal</from-outcome>
<to-activity-id id="__12">report</to-activity-id>
</control-flow-case>
</control-flow-rule>
<control-flow-rule id="__14">
<from-activity-id id="__15">previ</from-activity-id>
<control-flow-case id="__16">
<from-outcome id="__18">dialog:goReportPrevi</from-outcome>
<to-activity-id id="__17">report</to-activity-id>
</control-flow-case>
</control-flow-rule>
When a go to "Etat" page, launch my report window, close it with the 'X' button of the browser and going back to let's say "Real" page, the page just won't load completely and I got this error after 10 mins:
*<Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '13' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "616" seconds working on the request "weblogic.servlet.internal.ServletRequestImpl@1c68ec0[*
*GET /myapp/faces/javascript/favicon.js?_adf.ctrl-state=1303iqjhth_40 HTTP/1.1*
*User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 (.NET CLR 3.5.30729)*
*Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8*
*Accept-Language: fr*
*Accept-Encoding: gzip,deflate*
*Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7*
*Keep-Alive: 115*
*Connection: keep-alive*
*Referer: http://127.0.0.1:7101/myapp/faces/my-flow/real?_adf.ctrl-state=1303iqjhth_7&_afrLoop=255213241325922*
*Cookie: JSESSIONID=t942Mx3KqWtx05CvKcYMfGyCKNBV9nf27jsvLcpRMKJJnyng7Gjj!1056711659*
*]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:*
* sun.misc.Unsafe.park(Native Method)*
* java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)*
* java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:747)*
* java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:778)*
* java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1114)*
* java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:186)*
* java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:262)*
* oracle.adf.model.dcframe.DataControlFrameImpl.lock(DataControlFrameImpl.java:294)*
* oracle.adf.model.dcframe.DataControlFrameImpl.beginRequest(DataControlFrameImpl.java:336)*
* oracle.adf.model.BindingContext.setCurrentFrame(BindingContext.java:2107)*
* oracle.adf.model.BindingContext.setCurrentDataControlFrame(BindingContext.java:2009)*
* oracle.adfinternal.controller.util.model.DCFrameImpl.makeCurrent(DCFrameImpl.java:126)*
* oracle.adfinternal.controller.state.ViewPortContextImpl.makeCurrent(ViewPortContextImpl.java:1006)*
* oracle.adfinternal.controller.state.RequestState.setCurrentViewPortContext(RequestState.java:159)*
* oracle.adfinternal.controller.state.ControllerState.setCurrentViewPort(ControllerState.java:1247)*
* oracle.adfinternal.controller.state.ControllerState.releaseViewPort(ControllerState.java:1413)*
* oracle.adfinternal.controller.state.ControllerState.processViewPortReleaseQueue(ControllerState.java:2114)*
* oracle.adfinternal.controller.application.SyncNavigationStateListener.afterPhase(SyncNavigationStateListener.java:62)*
* oracle.adfinternal.controller.lifecycle.ADFLifecycleImpl$PagePhaseListenerWrapper.afterPhase(ADFLifecycleImpl.java:531)*
* oracle.adfinternal.controller.lifecycle.LifecycleImpl.internalDispatchAfterEvent(LifecycleImpl.java:120)*
* oracle.adfinternal.controller.lifecycle.LifecycleImpl.dispatchAfterPagePhaseEvent(LifecycleImpl.java:168)*
* oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.dispatchAfterPagePhaseEvent(ADFPhaseListener.java:124)*
* oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:70)*
* oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:53)*
* oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:364)*
* oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:205)*
* javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)*
* weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)*
* weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)*
* weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)*
* weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)*
* weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
* com.figaret.payroll.view.util.ApplicationSessionExpiryFilter.doFilter(ApplicationSessionExpiryFilter.java:124)*
* weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
* oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)*
* weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
* oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)*
* org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)*
* oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)*
* org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)*
* org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)*
* org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)*
* org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)*
* weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
* oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)*
* weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
* weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)*
* weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
* weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)*
* weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)*
* weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)*
* weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)*
* weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)*
* weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)*
* weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)*
* weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)*
* weblogic.work.ExecuteThread.run(ExecuteThread.java:173)*
After a while, my Weblogic Server throws an outOfMemoryException and I have to restart it which is dreadful in production mode.
My report page contains just an inline tag receiving a bytes Arrays from a Servlet to show the PDF doc:
<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=windows-1252"/>
<f:view>
<af:document title="#{res['report.title']}" id="d1">
<af:form id="f1">
<af:panelStretchLayout startWidth="0px" endWidth="0px" topHeight="30px"
bottomHeight="30px" styleClass="AFVisualRoot"
id="pt_psl1">
<f:facet name="top">
<!--<af:commandButton text="#{res['template.null']}" id="close"
partialSubmit="true" visible="true"
immediate="true">
<af:returnActionListener/>
</af:commandButton>-->
</f:facet>
<f:facet name="center">
<af:inlineFrame shortDesc="#{res['report.title']}" id="if1"
source="/pdf/report.pdf"/>
</f:facet>
</af:panelStretchLayout>
</af:form>
</af:document>
</f:view>
</jsp:root>
I tested by putting a button into my report page to close the page and containing a returnActionListener tag and when I close the page with this button, everything is fine.
<af:commandButton text="" id="close"
partialSubmit="true" visible="true"
immediate="true">
<af:returnActionListener/>
</af:commandButton>
Is this normal?
My problem is that our users are used to close the dialog using 'X' button so it is a 'must' for me to make it work.
Is this normal? OR Am i doing something wrong there?
I spent a full week looking for mistakes and searching into the net but I'm lost there
Any help welcome! :)
JackHi Puthanampatti,
That's what I thought and I did try to do what you said:
I added this into my report page:
<f:facet name="metaContainer">
<af:resource type="javascript">
window.onbeforeunload = simulateClick;
function simulateClick() {
if (document.getElementById('close') != null) {
// simulate a click
//alert('simulate a click');
document.getElementById('close').click();
//alert('CLICKED');
</af:resource>
</f:facet>
And here my close button into report page:
<af:commandButton text="#{res['template.null']}" id="close"
partialSubmit="true" visible="true"
clientComponent="true" immediate="true">
<af:returnActionListener/>
</af:commandButton>
But, this doesn't resolve the problem.
When doing so, I have this javascript error:
Erreur : AdfXMLRequest is not defined
Fichier Source : http://127.0.0.1:7101/payroll/afr/partition/gecko/default/opt/core-11.1.1.3.0-0084.js
Ligne : 457
SO now I'm quite lost and dunno what to do next.
I am 99% sure it was working well when I was developing with JDev11.1.1.2.
Is it not a regression?
Jack -
Where is the Firefox window with the Firefox button?
I can't find the Firefox window that has the Firefox button so I can click on troubleshooting information
button so I can reset Firefox. Please help?what kind of problems do you have that you want to reset Firefox?
Make sure that you do not run Firefox in full screen mode (press F11 or Fn + F11 to toggle; Mac: Command+Shift+F).
*https://support.mozilla.org/kb/how-to-use-full-screen
If you are in full screen mode then hover the mouse to the top to make the Navigation Toolbar and Tab bar appear.
Click the Maximize button (top right corner of the Navigation Toolbar) to leave full screen mode or right-click empty space on a toolbar and choose "Exit Full Screen Mode" or press the F11 key.
You can check for problems caused by a corrupted localstore.rdf file.
*http://kb.mozillazine.org/Corrupt_localstore.rdf -
Close a popup window with a custom button
Hi All,
I have two components A and B.
I will call one of the view of B in A as a pop up
Component A
Component B
as popup
BTN
Pressing of BTN which is a custom button created in component B must close the popup screen(Exit Component B).
I have tryied using Exit outbound plug in the corresponding window of Component B, but still it is not closing.
Can any one help me to solve this problem?OK here is the logic for the second option..
1. create a node in the component controller of the component B. make it interface node. ( say its name as WIN_NODE)
2. create an attribute there of type (type ref to IF_WD_WINDOW) (name as WIN)
3. create the same node in the view where you have the close button (custom close button). map it to the component controller
node.
then the same node will be present in the interface controller
view component controller interface controller
WIN_NODE-->WIN_NODE--
>WIN_NODE
WIN-->WIN--
>WIN
now go to the component A,
there you must have declared component B as the used component.
4.go the view which fires the window creation .
5. there go to the properties tab and add the interface controller or Component B as used controller.
6. After that go to context tab and create a node WIN_node having attribute WIN there also.
7. Map it to the node of interface controller of component B.
8. Now the coding part.
a.) in the component A which fires the event of opening the window, write the following code in the event handler.
data lo_window_manager type ref to if_wd_window_manager.
data lo_api_component type ref to if_wd_component.
data lo_window type ref to if_wd_window.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window = lo_window_manager->create_window_for_cmp_usage(
interface_view_name = 'WIN2'
component_usage_name = 'TEST'
* title =
close_in_any_case = abap_true
message_display_mode = if_wd_window=>co_msg_display_mode_selected
DATA lo_nd_win_node TYPE REF TO if_wd_context_node.
DATA lo_el_win_node TYPE REF TO if_wd_context_element.
DATA ls_win_node TYPE wd_this->element_win_node.
DATA lv_win LIKE ls_win_node-win.
* navigate from <CONTEXT> to <WIN_NODE> via lead selection
lo_nd_win_node = wd_context->get_child_node( name = wd_this->wdctx_win_node ).
* get single attribute
lo_nd_win_node->set_attribute(
EXPORTING
name = `WIN`
value = lo_window ).
lo_window->open( ).
you might be already having the code for opening and creating the window add the logic for passing the window instance to
context there as shown above.
b) in the context B fetch the window instance in the eventhandler of the close button and close it.
DATA lo_nd_win_node TYPE REF TO if_wd_context_node.
DATA lo_el_win_node TYPE REF TO if_wd_context_element.
DATA ls_win_node TYPE wd_this->element_win_node.
DATA lv_win LIKE ls_win_node-win.
* navigate from <CONTEXT> to <WIN_NODE> via lead selection
lo_nd_win_node = wd_context->get_child_node( name = wd_this->wdctx_win_node ).
* get element via lead selection
lo_el_win_node = lo_nd_win_node->get_element( ).
* get single attribute
lo_el_win_node->get_attribute(
EXPORTING
name = `WIN`
IMPORTING
value = lv_win ).
lv_win->close( ).
thanks
Sarbjeet singh -
Flex3 popup window with minimize/Maximize buttons
Hi All,
We are using title window as a pop-up in FLEX 3
The title window has a property called closeButton which when set to true displays a close button on the top right hand corner of the title window. Likewise, We also need minimizeButton property which can minimise the window. Is there any such component like title window which has this property of minimize/maximize the window or is there any suggestion to achive the same.
Thanks in advance.
Regards,
VenkateshHi All,
We are using title window as a pop-up in FLEX 3
The title window has a property called closeButton which when set to true displays a close button on the top right hand corner of the title window. Likewise, We also need minimizeButton property which can minimise the window. Is there any such component like title window which has this property of minimize/maximize the window or is there any suggestion to achive the same.
Thanks in advance.
Regards,
Venkatesh -
Javascript Confirm popup Yes, No button instead of OK and Cancel?
Hi,
I wrote javascript for confirm popup like below:
var answer = confirm ("Are you sure you want to delete this item ?");
It is showing OK Cancel button popup , but I want to display Yes No buttons on popup insted of OK Cancel buttons...
Appreciate if anyone give proper solution.
Thank you.
Still I could not get proper solution.... Please any one help me solve this... need js solution not jquery..Hi Praveen
There is not direct option in JavaScript to get Yes/No buttons in a Confirm dialog.
But, we can create a customized dialog box with our own HTML tags, controls and scripts and show it as a confirmation dialog using
window.showModalDialog() function
Here is the sample HTML to demonstrate how to create a customized confirmation dialog.
Dialog.HTML (This contains the UI for the confirmation dialog. Message, Yes No buttons etc)
<!DOCTYPE>
<html>
<head>
<title>Confirmation Message</title>
<script language="javascript" type="text/javascript">
window.onload = function()
var messageDiv = document.getElementById('dlgMessage');
if ( messageDiv != null && typeof(messageDiv) != "undefined" )
messageDiv.innerHTML = window.dialogArguments;
function confirmClick(args)
window.returnValue = args;
window.close();
</script>
</head>
<body>
<div id="dlgMessage">
</div>
<input type="button" value="Yes" id="btnYes" onclick="javascript:confirmClick('yes')"/>
<input type="button" value="No" id="btnNo" onclick="javascript:confirmClick('no');"/>
</body>
</html>
MainPage.HTML (From where the confirmation dialog will be shown. In your case, u can use the script in this html and customize it according to ur needs)
<!DOCTYPE>
<html>
<head>
<title>Main Page</title>
<script language="javascript" type="text/javascript">
function showConfirmDlg(message)
var returnValue = window.showModalDialog("dialog.html",message,"dialogHeight:150px;dialogWidth:200px");
if ( returnValue == 'yes' )
alert('Yes button is clicked in the dialog');
else
alert('No button is clicked in the dialog');
</script>
</head>
<body>
<input id="btnConfirm" type="button" value="Confirm" onclick="javascript:showConfirmDlg('Do you want to continue?');" />
</body>
</html>
Hope this helps.
See this MSDN Link for more information on how to use and customize the showModalDialog() function
http://msdn.microsoft.com/en-us/library/ie/ms536759(v=vs.85).aspx -
Opening new applet windows with button
I'm having a bit of trouble. I have this button when you click it, would open up another window with text in it. That works perfectly. But when I try to add another button for another window, it doesn't go perfectly.
I took out the useless code to show you the main stuff I'm working with.
import java.awt.*;
import java.applet.*;
public class HorseRacing extends Applet
CustomFrame gameWindow;
CustomFrame creditWindow;
Button openGame, openCredit;
Image redHorse, yellowHorse, blueHorse, orangeHorse;
public void init()
//Initializes the images
redHorse = getImage(getCodeBase(), "../classes/horsered.GIF");
yellowHorse = getImage(getCodeBase(), "../classes/horseyellow.GIF");
blueHorse = getImage(getCodeBase(), "../classes/horseblue.GIF");
orangeHorse = getImage(getCodeBase(), "../classes/horseorange.GIF");
//Instructions window
gameWindow= new CustomFrame("21 Century Horse Racing - Instructions", redHorse);
openGame=new Button("View Instructions");
add(openGame);
//Credit window
creditWindow=new CustomFrame2("21 Century Horse Racing - Credits");
openCredit=new Button("View Credits");
add(openCredit);
// Method Name: action()
// Parameters Passed: Event variable evt, Object varible obj
// Data Returned: Variable true
// Method Purpose: This block responds when the user takes an action
// (such as hitting the return key). It causes the paint
// block to be done again
public boolean action(Event evt, Object arg)
Graphics screen=getGraphics();
boolean visible=gameWindow.isShowing();
boolean visible2=creditWindow.isShowing();
if(evt.target instanceof Button)
if(visible)
gameWindow.hide();
openGame.setLabel("View Instructions");
else
gameWindow.show();
openGame.setLabel("Close Instructions");
if(visible2)
creditWindow.hide();
openCredit.setLabel("View Credits");
else
creditWindow.show();
openCredit.setLabel("Close Credits");
return true;
// Name: Sachit Harish
// Name of Program: CustomFrame
// Date Started: May 15, 2003
// Date Finished: 2003
// Program Description: This is a racing game where the program will
// generate random odds for the 4 horses. The user
// can then choose their horse and place a bet.
// The user will then see the horses race, and the
// money will be handed out depending on the odds.
class CustomFrame extends Frame
CustomFrame(String title,Image redHorse)
super(title);
Graphics screen=getGraphics();
//getClass().getResource("../classes/horsered.GIF").getImage();
//redHorse=getImage("../classes/horsered.GIF");
//screen.drawImage(redHorse, 0,0,10,10,this);
public void init()
setBackground(Color.gray);
public void paint(Graphics screen)
resize(430,280);
screen.setColor(Color.lightGray);
screen.fillRect(0,0,500,500);
screen.setColor(Color.black);
screen.drawRect(15,40,402,185);
screen.drawRect(14,39,404,187);
screen.setColor(Color.gray);
screen.fillRect(16,41,401,24);
screen.setColor(Color.black);
screen.drawString("- - Instructions - -", 160,58);
screen.drawLine(15,65,417,65);
screen.drawString(" Once you start clicking on the checkboxes to choose your horse, the", 20,80);
screen.drawString("odds will be created beside the horses. You can then select the horse",20,95);
screen.drawString("you want with the checkboxes and in the input box place your bet amount",20,110);
screen.drawString("Press enter to confirm your bet and click 'Race'.",20,125);
screen.drawString(" The horses will then race, and once they finish, the winner will be",20,145);
screen.drawString("displayed. If you didn't choose that horse, you will lose the money you",20,160);
screen.drawString("bet. If you won, you will be payed out depending on the odds of that",20,175);
screen.drawString("horse. Your bank will change according to how much money you lost or",20,190);
screen.drawString("made. Once that is over, new odds will be created and you can play",20,205);
screen.drawString("again.",20,220);
//Image title = getImage(getCodeBase(), "../classes/titlepicture.jpg");
//screen.drawImage(title, 0,0,430,220,this);
// Name: Sachit Harish
// Name of Program: CustomFrame
// Date Started: May 15, 2003
// Date Finished: 2003
// Program Description: This is a racing game where the program will
// generate random odds for the 4 horses. The user
// can then choose their horse and place a bet.
// The user will then see the horses race, and the
// money will be handed out depending on the odds.
class CustomFrame2 extends Frame
CustomFrame2(String title)
super(title);
Graphics screen=getGraphics();
//getClass().getResource("../classes/horsered.GIF").getImage();
//redHorse=getImage("../classes/horsered.GIF");
//screen.drawImage(redHorse, 0,0,10,10,this);
public void init()
setBackground(Color.gray);
public void paint(Graphics screen)
resize(430,280);
screen.setColor(Color.lightGray);
screen.fillRect(0,0,500,500);
screen.setColor(Color.black);
screen.drawRect(15,40,402,185);
screen.drawRect(14,39,404,187);
screen.setColor(Color.gray);
screen.fillRect(16,41,401,24);
screen.setColor(Color.black);
screen.drawString("- - Credits - -", 160,58);
screen.drawLine(15,65,417,65);
screen.drawString(" CREDITS", 20,80);
//Image title = getImage(getCodeBase(), "../classes/titlepicture.jpg");
//screen.drawImage(title, 0,0,430,220,this);
}If I take away everything associated with the creditWindow, it will work. But when I add that in, I get problems.
Also, I let in those redHorse, yellowHorse, blueHorse, and orangeHorse images because thats another problem I'm having - to get an image to work in one of those new windows.
-s64What happens if you change to a modern action listener?
-
How to create popup window with radio buttons and a input field
Hi Guys,
Can somebody give some directions to create a stand alone program to create a window popup with 2 radio button and an input field for getting text value. I need to update the text value in a custom table.
I will call this stand alone program from an user exit.
Please give me the guidance how go about it or please give any tutorial you have.
Thanks,
MiniHi,
There are multiple aspects of your requirements. So let's take them one at a time.
You can achieve it in the report program or you can use a combination of the both along.
You can create a standalone report program using the ABAP Editor (SE38). In the report program you can call the SAP Module pool program by CALL Screen <screen number>. And then in the module pool program you an create a subscreen and can handle the window popup with 2 radio button and an input field for getting the text.
For help - Module Pool programs you can search in ABAP Editor with DEMODYNPRO* and you will ge the entire demo code for all dialog related code.
For Report and other Module pool help you can have a look at the following:
http://help.sap.com/saphelp_nw70/helpdata/en/47/a1ff9b8d0c0986e10000000a42189c/frameset.htm
Hope this helps. Let me know if you need any more details.
Thanks,
Samantak. -
Quickstart to creating Window with Buttons+Hot Spots+
I'm a newbie too Java.
Would someone be kind enough to point me to a quick start... tutoral... sample code or whatever...
- to create a window with...
- Buttons
- Hot Spots
- Hot Objects
- Data Entry Fields, etc...
This will be a demo prototype for an app that may run both as a stand-alone application and a web based application... multi-platform...
thanks for any assistance.
WillCheck out the [url http://java.sun.com/docs/books/tutorial/]Creating a GUI with JFC/Swing tutorial.
-
Everytime I open Mozilla Firefox 5 Beta, a window pops up that says, "TypeError: Components.classes[cid_siterank] is undefined," with an "ok" button, after I click ok, it opens firefox, how do I stop this window from appearing everytime I open firefox? It never did this with previous versions of firefox.
Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
* Don't make any changes on the Safe mode start window.
* https://support.mozilla.com/kb/Safe+Mode
If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
* Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
* Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
In Firefox 4+ you can use one of these to start in <u>[[Safe mode]]</u>:
* Help > Restart with Add-ons Disabled
* Hold down the Shift key while double clicking the Firefox desktop shortcut (Windows)
* https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes -
Popup window with radio button-urgent
Hi..
Is ther any functionmodule for dispalying a popup window with radio button ....Use This
K_KKB_POPUP_RADIO2
I_TITLE ... This is the title
I_TEXT1 ... first radio button
I_TEXT2 ... second radio button
I_DEFAULT ... default
reward if useful
Amit Singla -
I'am using Mozilla firefox nightly version in Windows 8.1 .... after starting the Mozilla all toolbar options, minimize, maximum buttons works fine. but as soon as i open a new tabe the (minimize, maximize, close) options do not work with mouse left button clicking. I have to click taskbar "nightly icon" to minimize or close the browser.
HI Ashraful_007,
Currently Nightly is not a supported version and is changing each day, however please also to not be discouraged to try to start Firefox in Safe Mode to make sure it is not an add on as well as file a bug in bugzilla.mozilla.org.
Maybe you are looking for
-
Can I pass info from a frame to another and paint with the new info.
I want to compare two string one by one and then paint the result as a matrics. such as string1 = "ATTACGT" string2 ="CAGTCAT" then compare and see how they are same or different for every alphabit. then paint the result with a matric style. What can
-
Direct Path SQL Loader get error ORA-01555
Hi All, 11.2.0.1 DB Has anyone here used sqlloader direct path option? Is there special setting I need for the Undo TS? I am testing my sqlloader direct path but I got error : ORA-01555: snapshot too old: rollback segment number 10 with name "_SYSSMU
-
Cannot see any text or fields. The web page behind it shows. The Site/Site Management dialog box is transparent. see screenshot: http://www.mid-americaclutch.com/transparent_DW_dialog_Box.jpg
-
Sync video files with Lr Mobile
Another wish is uour command is the syncing of VIDEO files for Lr Mobile. It would be great if this comes true in a next update ..... TIA! Baldwin
-
645 Ultra and Geforce 4200, major problems, please help!!
I have read through this forum and have seen different problems with this mobo and geforce cards, so first here is my set up. P4 1.6A 645Ultra Rev 1 Bios 1.9 Visiontek 4200 128mb ddr IBM Hard Disk 7200 rpm 300W Codegen PS 256 Corsair DDR333 Let me pu