Javascript alert stops button firing in IE

This isn't really an Apex issue, it seems to be the way IE works - but I wonder if anyone has a work-around?
1) I have an item with an onchange event that displays an alert - e.g. onchange="alert('Hello');"
2) I have a button SUBMIT that submits the page in the usual way.
If I enter some data in the item, then move the mouse over to the SUBMIT button and press it, the onchange event fires and displays the alert. However, the SUBMIT is not performed, so I have to press the button a second time. Annoying, really. In Firefox it works fine.

Tony,
I'm curious if this would work:    onChange="javascript: return showAlert();"Or maybe even more simply back to your orginal onchange:   onChange="javascript: Alert('Hello'); return true;"--Jeff                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • I want a stop button for disabling JavaScript only in the current tab

    I want a 'Stop' button for disabling JavaScript only in the current tab.
    I searched for a feature like this but couldn't find it. It would be a great new feature.

    Tab Permissions: https://addons.mozilla.org/firefox/addon/4757

  • Javascript alert script needed when calculation does not equal 100

    I have created a fillable form and have a total box which I've set to calulate the sum of Field1, Field2, Field3 and Field4
    which works well.
    I would like to add a javascript alert if the total amount does not add to exactly 100 to stop the user submitting the form or moving to next question.
    Any help would be greatly appreciated
    Thank you

    Hi try67,
    I have implemented successfully the following:
    event.value = ''; // clear field
    // get the values of field 1 and 2 as string
    var sField1 = this.getField("field 1").value.toString();
    var sField2 = this.getField("field 2").value.toString();
    // adjust for a field being 100 and the other is null
    if (sField1 == 100 & sField2 == '') sField2 = "0";
    if (sField2 == 100 & sField1 == '') sField1 = "0";
    // do only if field 1 and 2 are not null
    if(sField1 != '' & sField2 != '') {
    event.value = Number(sField1) + Number(sField2);
    if (event.value != 100) app.alert("Fields 1 and 2 must sum to 100!", 1, 0);
    } // end not empty
    Just wondered if you can let me know what I need to add to stop the form being submitted(email submit button) if the amount is not 100?
    So the same alert appears ("Fields 1 and 2 must sum to 100!")
    Currently if the fields exceed or are below 100, then the alert message  ("Fields 1 and 2 must sum to 100!")
    appears once and you can still tab to next field, or click on next field or submit the pdf.
    I was hoping to add validation on submitto be similar to required fields where you are alerted if not filled in and cannot submit until you imputted the correct calculation sum up to 100?

  • Bug: error message in error console if i reload a page while a javascript alert() box is displayed.

    bug: i have an alert("haha"); displayed from an inpage button with javascript, and while the alert message is still open, if i do a refresh i get this error in the error console:
    Timestamp: 2/5/2012 12:27:27 μμ
    Error: uncaught exception: [Exception... "prompt aborted by user" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: resource:///components/nsPrompter.js :: openTabPrompt :: line 457" data: no]
    it happens on every site that shows an alert dialogue box
    online example:
    [http://www.w3schools.com/js/tryit.asp?filename=tryjs_alert w3schools example]
    press the "show alert box" button and as the alert box is open do a page refresh.

    I didn't realize you could reload in that situation; I thought alert() was application modal. Hmmm...
    In Firefox 13 beta 4 on Windows 7 I still see the error:
    Timestamp: 5/22/2012 7:41:13 PM<br>
    Error: uncaught exception: [Exception... "prompt aborted by user" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: resource:///components/nsPrompter.js :: openTabPrompt :: line 457" data: no]
    I don't think it has any negative consequence. Did you just want to get it on someone's list to look at, or is it a problem for your page/application?
    I looked in Bugzilla briefly and these sound related:
    [https://bugzilla.mozilla.org/show_bug.cgi?id=655181 Bug 655181 – modal dialog (e.g. via window.alert()) opened with meta refresh tag refresh page in background causes this uncaught exception: "prompt aborted by user" .. resource://gre/components/nsPrompter.js]
    [https://bugzilla.mozilla.org/show_bug.cgi?id=717248 Bug 717248 – Pressing backspace on alert() modal closes alert and triggers "back" functionality without firing onkeydown]
    Both note the error when navigating the tab in different ways with the alert displayed. But... not much attention to them so far.

  • OBIEE 11g: Dashboard not invoking simple javascript alert

    Hi Experts,
    I'm trying to invoke one simple ALERT command with javascript in obiee 11g dashboard. The purpose is when it loads, it should print one ALERT message and also when we change something in the prompt and clicking Apply button.
    Here is code written in a text item (Checked html markup option) after prompts;
    <script language="Javascript">
    alert ("Hello");
    </script>
    The Javascript alert message is showing when the dashboard page loads, but its not coming when we click the Apply button after changing the prompts.
    Can anyone give helpful hint, how to check it and why its not showing up when we press Apply button?
    Any hint or some useful links will b highly appreciated.
    Thanks in advance.

    You just used code and I would say the default event is onload of the page, thats the reason you are able to see alert.
    Since you didnt ask or written code onClick event to show alert, its not showing.
    You need to tell to browser when to prompt alert message instead of onload.
    Hope you are more confuse about 'how to do'
    if yes, mark :)
    give some more info about your actual req. that helps any other gurus to help.
    Edited by: Srini VEERAVALLI on Mar 27, 2013 8:42 AM

  • How do i disable a stop button within an event

    Using LabView 8.6 I'd like to disable my vi's stop button so the user can't stop the vi unless the network application is in the correct mode of operation.
    I only want the user to be able to stop the vi when it is ok to do so. What I tried works to prevent the stop button from operating at the wrong time but the vi does not always stop and I have to force the vi to stop.
    My event structure handles all the buttons and inputs for my vi. The event structure is within the while loop that generates commands for the network application when I click on one of the buttons or enter a value into a input field. Another while loop is reading data from the network application and displaying the data on the vi. I used a "Stop" local value to stop the display while loop.
    How am I supposed to disable the stop button but have my vi stop when it is ok to do so in the correct way?
    Attachments:
    Image 1.jpg ‏61 KB

    OK I'll try to handle this point by point.
    Q1, what gets wired to the "SilentShutdown" & "Discard?" when using "Application Instance Close?" 
    A1 Wire a TRUE to Discard?  That's the only thing that event case needs if the Stop condition output is default if unwired "F"   
    REASON you had a problem" it makes not sense to wire the same value to both Discard? and Silent Shutdown?  (Or even use both)  Discard in Filter events is used to "Trap" the event and decide if the app really wants to process it so discarding an app close removes the event and the OS wont process it.  Silient Shutdown? does just about the opposite an tru hear means "Shut down the app without any normal user prompts" Wiring them both T or F would trigger either allowing the app close event to process normally or triggering a application shutdown.
    COMMENT:  I've tried various combinations of nothing & true/false but clicking on the "Windows Red X" still closes the window (as far as I know no one has ever clicked the windows close, but the "Stop" button has been clicked a number of times by mistake)
    RESPONSE: Ah! You have "Trained" LabVIEW users!  They have been burned so often by LabVIEW code that they expect it to misbehave and don't even think about trying to "Close" a LabVIEW window.  In decades past the event structure did not exist in LabVIEW and so the only way to prevent the app close event from firing was "User Training."  There are better practices available now.
    Q2: If I get the previous suggestion to work and follow the next suggestion (Rip off the abort button), I won't be able to ever stop the vi when it hangs. It still does that sometimes. In my actual vi I'm still getting the hangs.
    Amplifications:
    if the vi stops[,] the network communication & control to the network application is lost.
    then the only way to stop this applications[external app on another processor] is with "^C" in the Putty window.
    A2: You've got the tail wagging the cart before the dog-horse!  BOTH application need to be rethought in such a manner as they can be independantly controlled.  But, this is a LabVIEW forum so I expect that your scope of work is to get the LabVIEW side working in a dignified manner- let's concentrate on that.  PuTTY windows and Task Managers are not evil - for debugging and integration.  especially when integrating multiple processes that may not yet be "Mature".  but a quick VISA write "^C" in your shutdown code might make the other application tolerable
    Q3hould I use a "Flat" or "Stacked" sequence to control the order of execution within the "data" loop?
    A3: NEITHER.  You should do a quick forum search for Queued State Machine or Queued Message Handler (QSM and QMH) after looking at the help for the QSM Sample Project (LabVIEW 2012 or later) the Shipping examples are a good place to start but! many discussion threads have questioned the example's exit practice and offered some alternate examples.
    Jeff

  • JavaScript Alert functionality in PL/SQL

    I'm in need of implementing the JavaScript "Alert" functionality (display message and wait for user to acknowledge) in the "before displaying the page" PL/SQL block of portal reports and forms. While I'm at it - How about the JavaScript "history.back" function as well?
    Is this possible? Can you point me in the right direction.

    Hi,
    Where Portal says "before displaying the page" what it means is that it will run this code before it starts to htp.p() out the HTML of the page.
    In WebDB this was actually what happened, in Portal there are some elements of HTML output BEFORE this block of code is run.
    Anyway I don't think that you can have an alert that displays before the page is loaded. The page will still show behind the alert.
    To get around this you would need a blank page to show your alert that forwards you on to the required page.
    The history function can be called by the onclick event of a button or you can access Javascript through an anchor tag:-
    link text
    Regards Michael

  • Not able to display javascript alert message from within a pl/sql block

    Hello,
    Can anyone please help me out with this issue. I wanted to display an javascript alert message from within a pl/sql block for an update button. Below is sample code which i am using. P1_ITEM is my hidden item on the report.
    begin
    if :P1_ITEM IS NOT NULL then
    HTP.p ('<script type="text/javascript">');
    HTP.p ('alert(''Please complete the item which is already assigned to you!'');');
    HTP.p ('</script>');
    end if;
    end;
    and I have made this code to be executed conditionally when request = Expression1
    Expression1: SUBMIT
    The thing is I am not able to display an alert message when the update button is clicked.
    Can anyone please help me with this one.
    Thanks,
    Orton

    varad but I also have an update statement within that block for the update button something like this i want to achieve.
    begin
    if :P1_ITEM IS NULL THEN
    update sample_tbl
    set col1 =:APP_USER,
    col2 = 'Y'
    where pk_col = ---;
    commit;
    HTP.p ('<script type="text/javascript">');
    HTP.p ('alert(''Successfully assigned an item!'');');
    HTP.p ('</script>');
    end if;
    if :P1_ITEM IS NOT NULL then
    HTP.p ('<script type="text/javascript">');
    HTP.p ('alert(''Please complete the item which is already assigned to you!'');');
    HTP.p ('</script>');
    end if;
    end;
    thanks,
    Orton

  • Hide Alert Me button of a Document Library

    Hi All,<o:p></o:p>
    I know there are some questions already out there on this topic. However, somehow I am
    not able to make it work in my case.<o:p></o:p>
    I want to hide Alert Me button on the ribbon for a specific document library. I added JavaScript
    to hide the button, however the issue is, when the page is loaded, I couldn't
    find the button, because it is still not available. <o:p></o:p>
    I tried to handle the click event of the FILES and LIBRARY text. However, I think
    SharePoint already has js files like, ribbon.js and core.js which handle the
    click event for FILES and LIBRARY and display the buttons accordingly. So my
    custom JavaScript function doesn't fire at all.<o:p></o:p>
    Any ideas will be appreciated. Thanks in advance. <o:p></o:p>

    Hi,
    Did you add content editor webpart and place the script
    <p><script language="javascript">
    function RemoveMenuItems()
    var menuItems = document.getElementsByTagName('ie:menuitem');
    for(var i = 0; i < menuItems.length; i++ )
    var menuItem = menuItems[i];
    var menuText = menuItem.getAttribute("text");
    switch(menuText)
    case "Alert Me":
    menuItem.parentNode.removeChild(menuItem);
    break;
    function AddSendSubMenu(m,ctx)
    return ;
    _spBodyOnLoadFunctionNames.push("RemoveMenuItems");
    </script></p><p></p><p>http://social.technet.microsoft.com/Forums/sharepoint/en-US/a35496a7-fad3-455b-9400-e2a90f0ed7e5/hide-context-menu-of-a-document-library-such-as-alert-me-and-send-to?forum=sharepointcustomizationlegacy</p>
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Javascript alert in Web Planning - timing when it pops up?

    Hi all,
    Javascript alerts such as
    alert('Layout not available, check your header combinations?')
    are easy to set up using the text component (html=true) in the web interface builder.
    My problem is that when using 'Tabs' (tab component), if you navigate between the tabs and your alert condition is activated, then the alert appears BEFORE the rest of the screen is rendered.
    Normally, the use of the 'onload' html statement in the <body> tag allows one to ensure some event only happens AFTER the entire page is downloaded/rendered into the web, but, because of the nature of our web BSP's used for planning web interfaces, it is really difficult to influence this html attribute.....!!
    In simple words, on navigation from one tab to another, does anyone out there know how to make my popups only popup AFTER all images have been rendered into the web page.....rather than BEFORE......??
    My guess is not one of you even know what I am talking about, eh?
    Many regards,
    Rael

    Rael, there was a lot of requirements through my personal experience, which cannot be accomplished fully in WIB. And very often these requirements were very critical to client.
    So just all web-planning applications, that I did, were extended through se80.
    And this is quite normal approach, because even SAP itself recommends development of own planning interfaces in case of complex requirements to user interface.
    >because the changes can be lost
    The necessary additions: buttons, layouts and so on can be made manually in se80 at any time later.

  • Javascript alert recording and testing

    I have a form on one of my recorded pages, if data in a particular field matches a certain combination of letters and numbers, a javascript alert is displayed after clicking on the submit button. However if the field is correct then the form will submit and execute the next page.
    Is there any way that I can check to find out if the dialog box has appeared and if it has go to a page later on in the script?
    Thanks in advance

    If I understand that right, if that alert pops up, the error has occurred, and the script won't continue because of the navigation failure. When the script fails, no other "next" page could possibly appear, so there is no point to save that information for later. Correct me if I am wrong.

  • How to give a javascript alert befor doing any insert or update

    Hi,
    Is there any way to give a javascript alert befor doing any insert or update? I want to use default insert/update button.
    Thank you
    Sumita

    just add:
    alert('Updating Record...');
    in the onClick event field for the UPDATE_TOP/UPDATE_BOTTOM button.
    You can do the same for the INSERT_TOP/INSERT_BOTTOM button. Adding javascript code in the event fields will not supersede the default PL/SQL events assigned to those buttons, unless you specifically remove the PL/SQL code (e.g. doUpdate;)..

  • Ios 7 javascript alert

    I have a weird issue with IOS 7 on both iPhone and iPad.  When a javascript alert box is displayed, the message is shown with an OK button.  Clicking the button does nothing.  The modal window freezes Safari and I have to close it down and reopen to clearn the alert box.  I've tried about everything, but nothing works except closing Safari.

    http://www.apple.com/feedback/iphone.html

  • Use Javascript with InDesign buttons?

    I haven't been able to find ANY info about this anywhere, but I'm wondering if it's possible to call a Javascript function from an InDesign button, instead of link to a web address. This can obviously be done in Flash, but the same syntax that works in Flash does not work in InDesign. I'm not referring to the Scripts panel here - I'm talking about using Javascript with a button created in InDesign. I tried calling a JS function with the GetURL action, to no avail.
    If anybody has ever done this, please post a sample of the correct syntax for a JS function call, as well as which action I should use. Many thanks in advance!

    (Edit: I'm talking about ID CS4/CS5 SWF export, naturally)
    I don't know why, but the following URL (using a global javascript function) seems to work, somehow;
    javascript:alert('testing');
    Arbitrary function names do not work - browser just says "function not defined" - although the same stuff works in Flash. For example;
    javascript:myFunction();
    Also, there seems to be very little info on which (button) properties are included in the SWF export.
    Additional information on the subject would be much appreciated here, too.

  • Javascript alert when showing all rows of a huge table ( 2000 rows)

    i've got this problem. I need to show all the rows of a table, i'm using ADF 10.1.3.4.
    What have i done so far?first of all i created a command link
    <af:commandLink shortDesc="Mostra Tutto" id="showAll"
    disabled="#{bindings.findAllVwEntePrmzRefrIter.estimatedRowCount == 0}"
    action="#{backing_editReferenza.onShowAll}"
    />
    In the backing bean i set the rangeSize of the table to -1
    public String onShowAll() {
    Object objShowAll = getSession().getAttribute("showAll");
    FacesContext fc = FacesContext.getCurrentInstance();
    ValueBinding vb = fc.getApplication().createValueBinding("#{bindings.findAllVwEntePrmzRefrIter}");
    DCIteratorBinding dc = (DCIteratorBinding)vb.getValue(fc);
    int oldRangeSize = dc.getRangeSize();
    dc.setRangeSize(-1);
    int rangeSize = dc.getAllRowsInRange().length;
    dc.setRangeSize(oldRangeSize);
    if ("Y".equals(objShowAll)) {
    getSession().removeAttribute("showAll");
    Integer oldRange =
    (Integer)getSession().getAttribute("oldRangeSize");
    getSession().removeAttribute("oldRangeSize");
    getTable1().setRows(oldRange);
    } else {
    getSession().setAttribute("showAll", "Y");
    getSession().setAttribute("oldRangeSize", oldRangeSize);
    getTable1().setRows(rangeSize);
    return "";
    // AdfFacesContext.getCurrentInstance().addPartialTarget(getTable1());
    Everything runs smoothly, but i have a problem if the table has lots of rows: i get a javascript warning that a script has been running for too long. (The alert goes: "Stop the execution of the script?" the usual javascript alert you get when a script runs for too long)
    What i want to achievt is that, if the table contains a lot of rows, the page takes a lot of time to load, but with no javascript involved (it's just a normal slow page).
    It seems that in some way the rows of the table are fetched by javascript and since the call is synchronous, it trigger the alert.
    This is how i declared the method iterator
    <methodIterator id="findAllVwEntePrmzRefrIter"
    Binds="findAllVwEntePrmzRefr.result"
    DataControl="FePrmzSLESSEJBLocal" RangeSize="10"
    BeanClass="it.ws.sma.prmz.ejb.model.VwEntePrmzRefr"
    Refresh="deferred"
    />
    and this is how i declared the table
    <af:table value="#{bindings.findAllVwEntePrmzRefr1.collectionModel}"
    var="row" styleClass="tableRefr #{backing_editReferenza.tableReferenzeStyleClass}"
    rows="#{bindings.findAllVwEntePrmzRefr1.rangeSize}"
    first="#{bindings.findAllVwEntePrmzRefr1.rangeStart}"
    emptyText="#{bindings.findAllVwEntePrmzRefr1.viewable ? 'Nessuna referenza trovata' : 'Accesso negato'}"
    binding="#{backing_editReferenza.table1}" id="table1"
    banding="row" bandingInterval="1"
    partialTriggers="btnEliminaRefr btnSvuotaPromo btnRemove btnAdd insVeloce">
    has anyone an idea onwhat could i do to have the table load all the rows from the server but withouth the alert?

    Sorry i haven't explain it well...
    the app is used to replicate entire databases, or agrupations of tables, from one database to another and it will have to be vendor independent... I'm trying with DB2, Oracle and MySQL. Later i will test it with more.
    Then I couldn't use vendor dependent SQL neither configuration parameters. Also I prefer to make the import logging the actions: for restoring purposes; maybe the user will have the option but defaults to the ohter.
    I'm thinking about some "strange" query SQL Stardard, like delete from table where (select .... using some kind of counter....

Maybe you are looking for

  • Could I have some help identifying and fixing dead/stuck/hot pixel?

    Hello, yesterday whilst watching a movie on my Macbook Pro I noticed something on my screen, at first I thought it was just something stuck on the screen but it seems to be an issue with a pixel. I would appreciate help regarding identifying if it's

  • MSI K8T Neo2 F 939 pin, any known video or other driver issues?

    Using a MSI K8T Neo2 F, AMD 64 3500+ winchestor, 1gb DDR400 3200 memory, New WD 740GD SATA HDD, ATI 9800 GT Pro 256 videocard. Fresh XP Pro SP2 install with all the update, latest Via 4 in 1s. Seems like my problems began when I upgraded video driver

  • Video Chatting with a Windows Vista User

    Hello. I am trying to connect with my friend through video chat on aim. I have a macbook and my friend has a PC laptop with Vista. When I log onto iChat and see that they are on I am able to click on the video icon and invite them to a video chat and

  • BKPF fields in Line item report

    Hello, Is it possible to populate BKPF fields like USER NAME, ENTRY DATE & REVERSAL DOC #, in the line item report displayed by using FS10N or FAGLB03? If it is not possible to display it in line item report, is creating a query the only option? Any

  • Unblock e-mail sender

    I don't know if this is the appropriate forum, but I have a problem.   I recently inadvertently block a e-mail sender.  How can I unblock the sender? This question was solved. View Solution.