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

Page Refresh (Frames)

Status
Not open for further replies.

peter11

Instructor
Mar 16, 2001
334
US
Is there a way to create a button that refreshes a page inside a frameset, not the whole frameset

Thanks,
pete
 
Hey mate,

Try this....
Put this in the head section of the page.

<SCRIPT language=&quot;vbscript&quot;>
sub refresh()
document.all.frame1.src=&quot;Frame pagename here&quot;
end sub
</SCRIPT>

And this where you have the refresh button....
<IMG src=&quot;image.gif&quot; border=&quot;0&quot; alt=&quot;Refresh&quot; onclick=&quot;vbscript:refresh()&quot;>

And also five the frame a name of &quot;frame1&quot;

Hope this is helpful
Pix :)
 

pixel69,

I tried the code and it did not work. The name of the frame is mainFrame but I changed it in the vbscript.

I also placed the vbscript in the head of the actual web page and the head of the frameset.

Is there something else I could be missing?

Pete
 
Move away from vbscript if you want to make your scripts cross-browser.
This is what you need:

<a href=&quot;#&quot; onclick=&quot;parent.frameName.location.reload()&quot;>reload this frame</a>

Replace the frameName with an actual frame name.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top