Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Getting Rid Of An ALERT

    I have the following code:

    window.open("http://pscsxmii.scglobal.com/Glass_Templates/DefectEntry.htm?"+x);
    alert ("Refresh Now");
    refresh_all();}

    I want the refresh_all function to execute when the program returns from the window.open. The only way I can get it to execute when returning is to put an alert command. But this requires a user response. I want the refresh_all function to fire when the window.open returns. Any help would be appreciated.

  • #2
    New Coder
    Join Date
    Aug 2006
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can put onblur in the BODY of DefectEntry.htm, and add a class with window.opener.refresh_all(), and this class have to function when the BODY of DefectEntry.htm loss focus.

  • #3
    Regular Coder
    Join Date
    Oct 2003
    Location
    on a ship
    Posts
    574
    Thanks
    1
    Thanked 6 Times in 5 Posts
    so you want the refresh_all() function to run after the content of the opened window has loaded?

    if so, so doing a while loop to search for a specific element within the openened window, and when it sees it (when the page has loaded) it will then call to the refresh_all() function and escape the loop.

    myWin=window.open("http://pscsxmii.scglobal.com/Glass_Templates/DefectEntry.htm?"+x);
    marker=myWin.document.getElementById('mark')?1:0;
    while(!marker){marker=myWin.document.getElementById('mark')?1:0;}
    if(marker){refresh_all();}


    then in side the source code of the window being opened place a small tag like so after the </body> tag:

    <div id="mark"></div>


    the above will keep checking for the exsistance of the specified element until it is there, then once it sees it it will call to the refresh_all() function
    refresh_all();}
    I make no attempt at pretending like I'm a professional. I offer help with what knowledge I do have.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •