Alert Box Displayed twice in response AJAX on Windows Mobile 2003

Hi,
I'm using AJAX in my application. In the inital page of app, I request by AJAX a one verification and in the response is displayed a alert box.
Windows Mobile 5.0 shows perfectly this alert box. But on Windows Mobile 2003, is displayed two alert box with the same response.
AnyIdea?
Thanks.
Regards,
Bruno

Hi Bruno Ambrozio ,
Just to understand AJAX's Open() method...
We use open() method before sending the request to the server and this takes 3 arguments.
- The first argument defines which method to use when sending the request  (GET  or POST).
  - The second, specifies the URL of the server-side script.
-  The third, specifies that the request should be handled asynchronously.
Since your problem was solved by changing the third argument may be the server action and the local script action are not synchronous coz of the variation of the processing speed in Windows Mobile 5.0 and Windows Mobile 2003...
Cheers,
kumarR

Similar Messages

  • Confirm box or alert box need twice click

    I  recently install safari on my Window XP System. I use it to visit a web site,if there is a button can popup a confirm box,I need to click[OK] twice to close it. Then I write a HTML page with javascript to test it.
    when I  write the javascript function confirm() or alert() in the  onload() event,it works well,click once and it's closed.
    but when I write the javascript function confirm() or alert() in a button click event, I need to click twice to close it.
    I think it's a bug, and I have no idea to deal with it.
    By the way,My safari version is 5.0.4
    How to fix it? anybody who can help me?

    Dear Carolyn,thanks for your reply.
    but, our customer don't want to update the safari version recently.
    anybody who is interesting in this problem can run the simple program  just by opening the html file by safari.
    create a file named test1.html
    CODE:
    <html>
    <body onload="confirm('OK?');">
    </body>
    </html>
    test result: It works well,  the confirm box is clicked once  and  closed.
    create a flie named test2.html
    CODE:
    <html>
    <body>
    <input type="button"  value="test" onclick="confirm('ok')" />
    </body>
    </html>
    test result: the confirm box need click twice  to  close.

  • 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.

  • Alert Message displayed according to WebService response

    I've created and used a Web Service in my VC application which simply send a mail. This Web Service returns a boolean response which indicates if the mail has been correctly sent. I want to inform the user accordingly with an alert message.
    If the response is correct, I want the user to be processed to confirmation page;
    If the response is uncorrect, I want to inform th user accordingly.
    Which operator should I use?
    Do I have to use the output point of my Web Service object?
    Thanks

    Hi,
    Thanks Fabien for your answer ... but it hasn't solved completely my problem.
    My webservice effectively returns a boolean, and I use this boolean to show wether a confirmation message or a error alert. But the alert form (which is normally displayed only if WSReturn == "false") is by default always displayed. The response sent by my webservice seems to be by default set to false... very strange, isn't it?
    Has anybody encountered such a situation? I just would like to display one form or the other depending of the result of my WS call.

  • When my Firefox language settings are fr_fr or fr_ca Firefox does not display the e with acute accent character correctly when it is displayed in a javascript alert box. However, it does display it correctly when my language settings are just fr. Please t

    Firefox does not display the e with acute accent character correctly from a javascript alert box when my browser language settings are fr_ca or fr_fr. However, it does it correctly when my browser language setting is fr. How do i get it to display e with acute accent and other iso8859 characters correctly in a javascript alert box when my browser language settings are fr_fr and fr_ca?
    == This happened ==
    Every time Firefox opened

    Use Unicode (UTF-8) for those characters.
    Then you will always be sure that they are displayed correctly.

  • Since upgrading my iphone 5 to OS7, the mail icon displays 11,507 in the red alert box.

    Since upgrading my iphone 5 to OS7, the mail icon is displaying 11,507 in the red alert box. I've tried to select all and mark as read but it keeps defaulting to the previous position. I only want to be aware of the new (genuinely unread) mails. How do I rectify this and go back to the old system which only notified me of the new arrivals?

    I Have same prob. Selecting unreads shows no unread messages

  • The dialog box open twice when open file from the server

    I use the following code to download/open file from the server:
    <%
    String filename = "MengxianhuiDocTest.doc";
    String filepath = "D:\\";
    response.setContentType("APPLICATION/OCTET-STREAM");
    response.setHeader("Content-Disposition",
    ??attachment; filename=\"" + filename + "\"");
    java.io.FileInputStream fileInputStream =
    new java.io.FileInputStream(filepath + filename);
    int i;
    while ((i=fileInputStream.read()) != -1) {
    out.write(i);
    fileInputStream.close();
    out.close();
    %>
    If the application runs, the Open or Save dialog box display.When I select open the file,
    the dialog box will display twice.
    Pls help me.
    Thanks.

    thx
    but I tried it and it did't work.
    The dialog box also display twice.

  • Alert box in a servet

    Hi all,
    In my servlet , in doPost() method i will check some condition and forward to some page ie...
    Test Servlet
    doPost(){
    //Test some condition and save data.....
    response.sendRedirect("firstpage.do");
    now before redirecting to firtspage.jsp i want to display an alert box(may be javascript) saying "Your data has been saved" and then forward it to firstpage.jsp
    Is it possible to do that in servlet class ie two actions displaying an alert box and forwarding to a page......

    You could use a META-REFRESH to send a new GET request to your URL of choice after a period of time. The current response (with the refresh tag) could then display the information you want of use a javascript alert to do so.
    <html>
      <head>
        <meta http-equiv="refresh" content="2;url="http://domain/context/page.do">
        <title>Success</title>
      </head>
      <body>
        <h1>Success</h1>
        <p>Your data has been saved.</p>
        <p>If you are not automatically redirected in a few seconds,
           <a href="http://domain/context/page.do">click here</a>
        </p>
      </body>
    </html>

  • Using Message Built-In - Message dialog box appears twice

    Hi all,
    I'm using the message built-in to display messages in forms.
    I use the message command twice to make it appear as a dialog box.(Using it once displays it in status bar)
    Eg.
    Message('Hello World');
    Message('Hello World');
    Sometimes, the dialog box appears twice instead of once.
    Is there a way to solve this ?
    Regards,
    Sam

    With an alert, you can write up to 200 characters in the alert box. With a message, you can write up to 255 characters, and if you want the message to pop up in an alert box, you can write a double message. I use:
    Message('Hello World');
    Message(' ',no_acknowledge);

  • Adding a carriage return in an alert box

    Hello
    I have a user request to display this alert box in the format below:
    Attention: The owner name has changed on this vessel.
    Current Name: xxxxxxx:
    New Name : yyyyyyy
    Please confirm or deny that this is an owner change.
    Confirm and Deny are the two buttons.
    How can I insert a c arriage return at the end of each text line so the text looks this way in the alert box? I can get it to wrap but it doesn't look right
    can the 'Confirm' and 'Deny' buttons be set to different colors?
    Thanks!

    Use chr(10).
    For example:
    v_alert := 'Attention: The owner name has changed on this vessel.' || chr(10) || 'Current Name: ' || etc....

  • Need an Alert box

    Is it possible to get an alert message whenever closing the file in the Indesign? The problem is, I will forget some checkpoints before sending the files. Making scripts, will need to run, specially, which cannot be in mind in rush times. But if an alert message shoots whenever we close a file, it will always be helpful. I just need to create a alert box to display some message, whenever I say, close or exit the file.
    Is this possible in CS2?
    Thanks in advance and help appreciated!
    Prasant

    CS2 you need a plug-in called InEventScript
    CS3 you need to create an event "beforeClose" with a script run as targetengine "session".
    Looks also in the Javascript samples provided w/ CS3 about events
    ==============================================
    #target indesign
    #targetengine "session"
    app.scriptPreferences.version = 5.0;
    //******************** BEGIN Main ********************
    main();
    function main()
    //** Number 0
    app.addEventListener( "beforeClose", EventClose, true);
    alert ("Event(s) added...");
    //******************** END Main ********************
    //******************** EVENTS ********************
    function EventClose (itsEvent)
    alert ("Don't forget your checklist!!!);
    ==================================================

  • Polish , turkish text not decoding in the alert boxes in JSP file

    Hi All,
    Currently I am working on application in the J2ee development perspective in NWDI  and this contains many Jsp pages.As per the business requirement we need to make this application support Polish and turkish languages , for this we have maintained properties files .
    I have encoded the polish and turkish text using the u201CHTML Unicode format encodingu201D hence when checked the url in the IE with Polish and turkish locale all the characters are getting decoded properly ,but i have a proplem with the text in the alert boxes i.e. the special characters in the text displayed in the alert boxes is not getting  decoded at all eg:"Wprowad&#378; numer konta BP" whereas it has to display as "Wprowadź numer konta BP:
    Also i have used java encode also to achieve the same and for this "?" is getting displayed i.e. it is not getting properly decoded.
    I have also used native2ascii method in this also it is getting decoded but not correctly i.e. "?" is displayed
    Please note that the alert boxes are written in the script tag in the JSP page.
    Request you to kindly help me in resolving the issue at the earliest as this is a very critical issue in my project now.
    Thanks and Regards,
    Nishita Salver

    Hi nishita,
    We had a similar problem in one of my projects, but what i remember is we have kept the ascii value for that character directly in the properties files and tried to encode it, this way i resolved my problem.
    Try this way and let me know the result.
    Regards,
    Saleem Mohammad.

  • Centering an Alert box.

    I have a flex web application in which the flex components are embedded inside portal jsps. When the user clicks on a datagrid (clicks on item renderer inside the datagrid), the Alert box has to notify the user. However the alert box centers itself wrt the flex application and it goes out of the user's view. Because the user can view only a portion of the large datagrid at a particular time (scrollbars for the page are present, not for the datagrid).
    I have tried assigning absolute and relative values, but nothing seems to work.
    Any suggestions woudl be greatly appreaciated.
    Thanks in advance.

    I've run into a similar situation and here is what I did to resolve it without using the move method...
    Say you have an application that has a layout container which contains a custom component in it somewhere
    Application
           |--->HGroup
                        |---> CustomComponent (the one that calls the alert box)
    if your alert box code looks like this:
    Alert.show(
    "Your Alert Message Here!","Your Alert Title Here...",0x4,this,null,null);
    Your alert box will appear centered over the custom component which called it.
    Add an id to the container you want the alert box centered on:
    Application
           |--->HGroup id="myContainer"
                        |---> CustomComponent (the one that calls the alert box)
    Change your alert box code to look like this:
    Alert.show(
    "Your Alert Message Here!","Your Alert Title Here...",0x4,this.parentApplication.myContainer,null,null);
    This will center the alert box over the HGroup layout container that has its id property set to myContainer.
    The example above sets the parent property of of the Alert class show method:
    public static function show(text:String = "", title:String = "", flags:uint = 0x4, parent:Sprite = null, closeHandler:Function = null, iconClass:Class = null, defaultButtonFlag:uint = 0x4):Alert
    So if I'm understanding your issue correctly... regardless of the size of your viewport you'll maybe want a dynamic method to determine the id porperty of the layout container currently being displayed within the viewport, and then center your alert box over that container via the method above.
    I hope this helps.

  • [CS5/JS/ScriptUI]: All contents is removed from tabbedpanel when showing alert box or other Window.

    When I open a new window (an alert box, another scriptUI window, or an old style InDesign dialog) from my non modal ScriptUI interface, the contents inside all tabs on the tabbedpanel of the window disappear completely, and the last tab is selected.
    Other controls, outside the tabbed panel (but in the same window) are left untouched.
    I suspect the error has to do with the tab control. I have been able to recreate the error in an extremely simple window, and I attach the code below.
    #targetengine 'test'
    var Window1 = new Window('palette','Test',undefined);
    buildWindow();
    Window1.show();
    function buildWindow(){
        Window1.tabMain = Window1.add('tabbedpanel',undefined,undefined);
        Window1.tabMain.minimumSize= [450,170];
        Window1.tabMain.Tab1 = Window1.tabMain.add('tab',undefined,"Tab 1");
        Window1.tabMain.Tab1.Static1 = Window1.tabMain.Tab1.add('staticText',undefined,"Text on tab 1");
        Window1.tabMain.Tab2 = Window1.tabMain.add('tab',undefined,"Tab 2");
        Window1.tabMain.Tab2.Static1 = Window1.tabMain.Tab2.add('staticText',undefined,"Text on tab 2");
        Window1.tabMain.Tab1.btnTest = Window1.tabMain.Tab1.add('button',undefined,"Test");
        Window1.tabMain.Tab1.btnTest.onClick = function(){alert('btnTest_onClick')};
        // Trying with calls to layout . (This button is not affected by the alert showing - only controls inside the tabbed panel)
        Window1.btnLayout = Window1.add('button', undefined, 'Window1.layout.layout()');
        Window1.btnLayout.onClick = function(){Window1.layout.layout()};
    The interface works well in CS4, and also if I make the window modal (by creating it as a "dialog").
    In CS5, the result is this:
    Calling layout.layout() or layout.resize() doesn't do anything.
    If someone else would like to try my code, do you get the same effect?
    Is the behaviour known?
    Is there a way to prevent this from happening for non modal ScriptUI windows?
    Best regards,
    Andreas Jansson

    Thanks Marijan, for testing and letting me know!
    I filed a bug report now. We would perhaps have to "force" a couple of our clients to an upgrade from CS5 to CS5.5 in order to beat this bug and get it working, unless Adobe acknowledges it quickly, which I don't count on.
    No good news then... I took for granted that the interface would work in CS5 if I made it in CS4.
    (The thing that I was mostly concerned about was a tree view which I tested in Mac/PC and on CS4/CS5. Not the "tabbed panel"...)
    Andreas
    Adding this answer I got from Adobe:
    Monday, November 21, 2011 2:21:03 AM PST
    Hello Andreas,
    I was able to replicate this problem with InDesign CS5. This bug seems
    to have already been fixed as a side effect of some code change within
    InDesign CS5.5.
    I have logged this under bug # 3050997. This will now be worked upon by
    InDesign engineering and should be fixed soon.
    I'll keep you informed about updates on this bug.
    Message was edited by: Andreas Jansson. Response from Adobe added.

  • How to get alert box in the middle of scriptlet?

    Hi,
    I got a problem.Please help to resolve that one
    In the following code the alert box is not coming even though the condition is true.
    Can anyone please resolve it
    <%
    Cookie axsCookie;
    axsCookie = new Cookie("user_id", "");
    response.addCookie(axsCookie);
    axsCookie = new Cookie("user_lang_code", "");
    response.addCookie(axsCookie);
    axsCookie = new Cookie("default_lang_code", "");
    response.addCookie(axsCookie);
    String logOut=request.getParameter("logOut");
    if(logOut!=null)
    %>
    <script type="text/javascript">
    var temp='<%=logOut%>';
    if(temp=="true")
    alert('Your password is successfully changed.Please relogin.');
    </script>
    <%
    session.invalidate();
    response.sendRedirect("/priv/logging.jsp");
    %>

    Hi,
    Please use 3 variables of Cookie class.
    <%
    Cookie axsCookie1,axsCookie2,axsCookie3;
    axsCookie1 = new Cookie("user_id", "");
    response.addCookie(axsCookie1);
    axsCookie2 = new Cookie("user_lang_code", "");
    response.addCookie(axsCookie2);
    axsCookie3 = new Cookie("default_lang_code", "");
    response.addCookie(axsCookie3);
    String logOut=request.getParameter("logOut");
    if(logOut!=null)
    %>
    <script type="text/javascript">
    var temp='<%=logOut%>';
    if(temp=="true")
    alert('Your password is successfully changed.Please relogin.');
    </script>
    <%
    session.invalidate();
    response.sendRedirect("/priv/logging.jsp");
    %>

Maybe you are looking for

  • No more error messages

    Today Director suddenly stopped giving me error messages on runtime. When I run a movie and Director encounters an error, it just stops executing without displaying any message. I never experienced this in 7 years use of Director (I am still using 8.

  • Problem in restoring my iPhone 4

    HI... I tried to restore and update my phone software, itunes downloaded the software and it automatically updated the phone's it. Now during the initial configuration of the phone, it says that the software cannot be registered at the moment and tel

  • Stock & Non stock item

    Hi Experts, Could you please tell me how to recognised the stock material. Like if we consider material type NLAG it is purely non stock item.Like wise which are the material type is consider for stock item. How can we identified the stock material.

  • End user deskptop certification question

    Hi All, I have been playing with the certification tab in MOS and couldn't find what I am looking for. Maybe I am using the wrong options... I am trying to find what are the pre-requisite to have Windows server 2003 32bits with IE8 and Windows XP Pro

  • How can I download heart rate data to plot it?

    After setting things up appropriately, the heart rate readings from the sensors in my Watch are correctly appearing within the Health App on my iPhone. I can even see all of the every-10-minutes readings, in a list. I need to be able to extract that