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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help with refreshing problem

Status
Not open for further replies.

etjohnson81

Programmer
Jul 17, 2006
72
US
I have an window.open for a form to upload a profile picture, how can I make the main window refresh after the file has been uploaded or the file window closed.

Just trying to make it so that the user doesnt have to manually refresh to see the picture in place.

<A href="<img src=" border=0></a>
 
put this onload code in your body of the popup after the file is upload in the popup change MainWindowName to the name of your MAIN window name

Code:
<body onload="top.MainWindowName.location.reload(1)">
 
i think the safest way would be for you to have a button or link on the popup that says "Close this window." the code would look like this:

Code:
<a href="#" onclick="opener.location.reload(true);window.close();return false;">Close This Window</a>



*cLFlaVA
----------------------------
[tt]somebody set up us the bomb![bomb][/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
The problem I see with that... is what if they hit the X instead of the close window link...

- Jason
 
You can show the onload event aftert he file isuploaded, then do : onload : refresh : close
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top