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

Function to refresh browser 1

Status
Not open for further replies.

soonkhoo

Programmer
Dec 8, 2000
133
MY
Does anyone know what command to use to refresh the browser?
 
WIll it refreshes the whole browser? What if there are frames. Say, if I include

<input type=&quot;button&quot; value=&quot;Refresh&quot; onClick=&quot;refresh()&quot;>

what's wrong with it?
 
Call it from the frameset page i guess? &quot;Alright whatever man, I'll hook up the hair, but I aint touchin the ring...Cause I'm still a pla--yer&quot;
 
something.refresh()
where something can be either the frame.document or the window.document or whatever

 
Say if I have 2 frames, and I what my refresh button to be at the top frame, the nav bar, what should I put in?

is it <input type=&quot;button&quot; value=&quot;Refresh&quot; onClick=&quot;window.document.refresh()&quot;> ?

I did this and it didn't work..
 
hmmm... it still didn't work.. it says error...

how do you type the input button again?
 
I did it..but I didn't use the refresh() coz it didn't work for me. So I created a restart button to go to any page. It automatically refreshes and not a history function.

These code goes into the main frame. It didn't for on the nav bar. If someone can help me with that, that'll be great. Thanks.

This code goes in head:
<script language=&quot;javascript&quot;>
var restart = &quot;Anything.html&quot;;
function refreshup()
{
window.top.location=restart;
}
</script>

This code goes in Body:1
<input type=&quot;button&quot; value=&quot;Restart&quot; onClick=&quot;refreshup()&quot;>

 
window.location.reload() will reload the document - not sure if this applies here cuz I dind't have time to read all of these :eek:) jared@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top