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

Refresh frame

Status
Not open for further replies.

exodus300

Programmer
Mar 22, 2002
262
AU
How can I force the page in a particular frame to refresh, from another frame? for example, I have a page which the user enters their name. Then, in the contents frame, it must refresh to say their name instead of "Guest". [pc3]
 
if you simply want to change "guest" to the user's name, i think it would be easiest to use javascript. for example, if the text were like...

Code:
<div id=&quot;divUser&quot;>Guest</div>

...then you could have javascript like...

Code:
frameName.document.all.divUser.innerHTML = userName;

note that the above only works on ie. for ns6 you'd need to add a branch for...

Code:
frameName.document.getElementById(&quot;divUser&quot;).innerHTML = userName;

glenn
 
Try vbscript if you like ie:

You have named a table cell id=&quot;welcomeCell&quot;, and the frame name is &quot;frame_welcome&quot; then in some event in the first frame you would script:

window.parent.frames(&quot;frame_welcome&quot;).welcomeCell.innerhtml = &quot;<font color=blue>&quot; & txtUser.text & &quot;</font>&quot;

and so on. It could be a div, or any other element. Jonathan Galpin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top