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

refreshing iframe

Status
Not open for further replies.

fldbryan

Programmer
Jan 22, 2004
46
US
Does anyone know how to refresh an iframe in vb script.

TIA. You guys are getting me back up to speed quick.
 
do you mean clientside vbscript? If so i'd use javascript as its cross browser compatable! To achieve with javascript use...

document.getElementById["iframeID"].document.location.reload();

HTH

Rob

Go placidly amidst the noise and haste, and remember what peace there may be in silence - Erhmann 1927
 
Thanks but I realized it wouldn't help in what I'm trying to do. I know there is a sub_PageLoad routine, but is there a routine I could use when a page got focused again after a history.back() call? I'm udating a table and when I return to the original page I'd like to be able to refresh it.

Any ideas?
 
When you do a history.back call this is client side and the page doesn't get refreshed by the server. Hence there is no way to force the page refresh other than client side. Can you not just change the location of the iframe as above rather than do history.back forcing a new request from the server?

Rob

Go placidly amidst the noise and haste, and remember what peace there may be in silence - Erhmann 1927
 
Since IFrame is only supported by IE. I've written everything in vbscript. I can't seem to get your command to work properly.

The name of the iframe is sub and it's in a form called MainMenu. I can't get it to execute. Maybe I'm writing it wrong.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top