Jump to content

input type="button" onclick="window.reload(); ?


vmars316

Recommended Posts

Hmm...

Yes , that's interesting .

this one:

<input type="button" onclick="window.reload(); return false;" value="click me" /> </a>
runs fine , locally , no errors .
This one run locally , gives this error:
<input type="button" onclick="window.reload(); return false;" value="click me" />
mozilla.org-Breakout-All-ReadOnly-vmTest01.html:18 Uncaught TypeError: window.reload is not a function
Run online:
they both get errors:

<input type="button" onclick="window.reload(); return false;" value="click me" /> </a>

mozilla.org-Breakout-All-ReadOnly-vmTest01.html:16 Uncaught TypeError: window.reload is not a functiononclick @ mozilla.org-Breakout-All-ReadOnly-vmTest01.html:16
<input type="button" onclick="window.reload(); return false;" value="click me" />
mozilla.org-Breakout-All-ReadOnly-vmTest01.html:18 Uncaught TypeError: window.reload is not a function

The surrounding code looks like this:

 

<body>

<canvas id="myCanvas" width="480" height="320"></canvas>
<div <div style="background-color:#eeeeee; width:480px; margin:0 auto;">
<img id="flaming" src="./sprites/fireTransparent.gif" width="480" height="42" />
<input type="button" onclick="window.reload(); return false;" value="click me" />
</a>
<input type="button" onclick="window.reload(); return false;" value="click me" />
</div>
<script>

 

 

I can Post the whole code if you like , its 196 lines .
You can run it here:
It's the breakout game , with a few additions .

 

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...