Quick button question
hi all,
hopefully just a quick & easy question.
I want to make the following code
work so that when the button is pressed
a named page is displayed in the *existing*
window. In the example below the named
page opens in a new window not the existing
window?
Any Ideas/help greatly appreciated.
<form>
<input type="button"
value="Click Here"
onclick=window.open("index.html")>
</form>
Arielladog posted this at 03:07 — 10th May 2000.
They have: 122 posts
Joined: Jun 1999
try this code adn change index.html to whatever you want:
<form>
<input type="button" value="Click Here" onclick="top.location.href='index.html'">
</form>
Moderate at JavaScriptCity Forums
myriad posted this at 07:24 — 10th May 2000.
They have: 88 posts
Joined: Mar 1999
Many thanks - much appreciated!
Regards
Steve
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.