Click here to Skip to main content
15,903,854 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I had a problem in website design.I am not able to use navigation buttons.How to use navigation buttons instead of navigation links in any html webpage
Posted

Use javascript method window.open() on a button click
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 29-Jan-12 23:54pm    
It will certainly work, my 5.

I suggested another method, without JavaScript (which is more universal, so it would work even if scripting is disabled), please see my answer.

--SA
For example, inset this code in your HTML page:
HTML
<form method="link" action="http://www.codeproject.com/Questions/ask.aspx">
   <input type="submit" value="Click to navigate…"></input>
</form>


Just for a test, it will work if this is all of the HTML page code. Click the button and see how it works.

This method is more universal than the one using JavaScript, as it can work even of scripting is disabled in the browser, which is always better.

—SA
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900