...

View Full Version : Getting Rid Of An ALERT



T22958
01-03-2007, 01:58 AM
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.

Wylie
01-03-2007, 06:04 AM
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.

brandonH
01-03-2007, 06:11 AM
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();}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum