Click to See Complete Forum and Search --> : need help with a refresh button..
zero_1984
05-01-2003, 11:15 PM
ok heres the idea.. basically, i want to make a image have the ability to refresh the entire window.. this includes all the frames or at least a specific frame.. any clues to how to do this, i cant find any help anywhere!
if you need to view what i mean, goto http://members.optusnet.com.au/dgulli and click on the products button and look @ the bottom of the page, where it has a "goto top" button in another frame.. i basically want that button to refresh the page above it...
SniperX
05-02-2003, 12:08 AM
Ummmm, i am not to sure what you mean - but whenever i need to refresh a page i use this code = history.go(0);
i.e.
<input type=button value=' Refresh ' onClick="history.go(0);">
Hope thats what ur looking for...
Regards
MW
zero_1984
05-02-2003, 12:10 AM
ok well let me put it this way.. how do i make a button that refreshes multiple frames
or how do i make a button that refreshes another windows, without having to be file specific, ie no "index.html" or whayever
SniperX
05-02-2003, 12:13 AM
Have you tried the code i gave you?
zero_1984
05-02-2003, 12:15 AM
yeh ive tried it.. it only refreshes the frame that the button is in :/
SniperX
05-02-2003, 12:20 AM
I actuall cant remember how to refresh multiple frames...
I know that i could close a window with frames but i cant find the code listing - i will think on this for a while
SOORRRRY
zero_1984
05-02-2003, 12:21 AM
thanks! if you do remember please post asap, its a pretty urgent thing to do really...
SniperX
05-02-2003, 12:25 AM
Why do you want to refresh all the frames?
Because i do know that history.go(0); refreshes the current page that changed
i.e.
If you click a link and frame 1 and 2 changed but frame 3 didnt then history.go(0) will refresh frames 1 and 2, but not three because it didnt change....
zero_1984
05-02-2003, 12:27 AM
well specifically i want to it to refresh one frame called "mainFrame"..
i just figured if i asked how to refresh them all i could figure out how to re-fresh one page?
SniperX
05-02-2003, 12:33 AM
Try this:
<input type=button value = ' Refresh ' target='mainFrame' onClick='history.go(0);'>
Dont know if that will work...
zero_1984
05-02-2003, 12:39 AM
ok.. only problem is how do i put that in?! i want to put it in as a <a href> thingy if u know what i mean?
as in <a href=javascript.blah.blah()
zero_1984
05-02-2003, 12:43 AM
btw.. that code just refreshes the same frame again :|
zero_1984
05-02-2003, 12:45 AM
oh btw... i figured out the a href thing that does the same thing as the code you gave me...
<a href="javascript:window.history.go(0); target:"mainFrame");">
but it still refreshes itself and not another frame :(
SniperX
05-02-2003, 01:05 AM
Try messing around a bit:
i.e.
Change the frame name:
<a href="javascript:history.go(0);" target="anotherFrame">