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

How to make a refresh button

Status
Not open for further replies.

mrkobby

Programmer
Aug 22, 2002
27
US
I have made a simple game in flash and I have a button which I want to refresh the page.Can anyone help with actions I should give to the button?
Thanx
 
Wow, why so complex? Wouldn't it be just as effective to use
Code:
onClick = "window.location.reload()"
?

--Ryan
 
When I tried it, this is the response i got.


<.... Scene=Scene 1, Layer=Interactions, Frame=11: Line 1: Identifier expected
onClick={&quot;window.location.reload()&quot;} ....>

i think I am missing someting in the code:
Please help.

Thanx
 
try javascript:window.location.reload() [rockband]
sleep is good
 
I never know when to put the &quot;javascript:&quot; in or not. It seems you need to put it in hrefs, but usually not in events such as onClick. But deecee's response here says something other than what I've thought, so now I'm confused. Can anyone tell me the hard and fast rules for this? [ponder]

--Ryan
 
you would put my response in for the href <a href=&quot;javascript:window.location.relod()&quot;>click here to reload</a> like such
then there is <img onclick=&quot;window.location.relod()&quot; src=&quot;myimage.jpg>
same thing.....as with most journeys in life there is more than 1 way o get from point A to point B [soapbox]
sleep is good
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top