Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

That pesky refresh error warning - how to get rid of it? 1

Status
Not open for further replies.

GirlFriday1

Programmer
May 1, 2001
20
CA
Hello! I have a popup window that updates info in a database, closes and is supposed to refresh the table in the parent window. It works, except that the user must interact with a warning box to continue. I need to get rid of this box. Any suggestions?
My code to date is this:

<script language=javascript>
function setOther(){
window.opener.location.pathname = &quot;/ServiceBulletins/admin/manage.asp&quot;;
window.opener.DeptForm.submit();
window.opener.location.reload();
window.close()
}

Thanks!
 
It may be a security issue ... there are certain restrictions on the actions which you can perform on windows which you didn't open yourself.

Greg.
 
That is true, but the parent window that I opened, opens the child window and then back again, so I don't think that security will come into play for this particular example. The info is going where it is supposed to go, but it's that extra, annoying step of manually refreshing that's the problem. I tried the window.opener.focus() to return the focus back to the parent window, but I still get the error box.
Any sugestions?
Thanks!
 
it's a security issue, AND also browser dependant ... meaning, you have to find a way to kill all your clients who are NOT using the proper browser with the proper option ... or maybe get used that some clients might encounter some problems.
 
Hello again! I figured it out (Thanks Link9!). In order to accomplish every thing that I needed to do, it was a matter of timing, literally. I created a new select statement within my program and used this Quit select to call the updating Javascript function. To call the quit, I refered to it in another select statement that actually updated the database. All of which is in an asp file. The timing came into play becase the page was refreshing before the database was actually updated. Phew!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top