Book38
01-02-2003, 10:52 PM
I'm new to JavaScript but not affraid to try.
I am using buttons created in Javascript on my website and I need to use frames on 3 pages. When you click on any of the buttons you are supposed to go to a different page. But if I click on the button in a frameset to go elsewhere, the page opens up in that same frame.
How do you get javascript to let you click on a link and open an entirely new page? There must be some syntax I am missing.
Here is the code for one of the buttons:
<input type="button" name="Button" class="thisclass" value="Greetings " onMouseOver="this.style.color='#000000'" onMouseOut="this.style.color='#000000'" onMouseDown="this.style.color='#000000'" style="color:#000000; font-family:Algerian; font-weight:none; font-size:10px;" onClick="jumpto2('<a href"http://something4me.com/greets.html" target=_top')">
I know this is the wrong syntax as it does not work. If I take out the href and target tags it just opens up in the same window as the link clicked.
I have exausted myself trying to find a simple answer to a very simple problem.
I am using buttons created in Javascript on my website and I need to use frames on 3 pages. When you click on any of the buttons you are supposed to go to a different page. But if I click on the button in a frameset to go elsewhere, the page opens up in that same frame.
How do you get javascript to let you click on a link and open an entirely new page? There must be some syntax I am missing.
Here is the code for one of the buttons:
<input type="button" name="Button" class="thisclass" value="Greetings " onMouseOver="this.style.color='#000000'" onMouseOut="this.style.color='#000000'" onMouseDown="this.style.color='#000000'" style="color:#000000; font-family:Algerian; font-weight:none; font-size:10px;" onClick="jumpto2('<a href"http://something4me.com/greets.html" target=_top')">
I know this is the wrong syntax as it does not work. If I take out the href and target tags it just opens up in the same window as the link clicked.
I have exausted myself trying to find a simple answer to a very simple problem.