HTML code for button to open another web page

powermixx
powermixx used Ask the Experts™
on
What's wrong with this HTML code? I want to place a button on a form and have it link to this location:
www.realtimedj.com/cal/fl/powermixx.nsf/login.html


<img src="images/client_login_norm.png" alt="" height="40" width="119" border="0"><button name="client" value="www.realtimedj.com/cal/fl/powermixx.nsf/login.html" type="button">Client Login</button><br>
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Development Team Lead
Commented:
<img src="images/client_login_norm.png" alt="" height="40" width="119" border="0">
<input name="client" onclick="location.href='http://www.realtimedj.com/cal/fl/powermixx.nsf/login.html'" type="button">Client Login</button><br>
Commented:
<img src="images/client_login_norm.png" alt="" height="40" width="119" border="0"><button name="client" onclick="javascript:window.open('http://www.realtimedj.com/cal/fl/powermixx.nsf/login.html')" type="button">Client Login</button><br>


Commented:
crap..too slow
Michel PlungjanIT Expert
Top Expert 2009

Commented:
Actually one needs to mix both your answers

The code
onclick="location.href='http://www.realtimedj.com/cal/fl/powermixx.nsf/login.html'"
is correct
window.open needs more than one parameter, the second being the name of the window and will open a new window which was not the question

However

<input name="client" .... type="button">Client Login</button><br>
is also wrong so the combined answer is EITHER

<button name="client"
onclick="location.href='http://www.realtimedj.com/cal/fl/powermixx.nsf/login.html'">Client Login</button><br>

or the more compatible

<input type="button" name="client"
onclick="location.href='http://www.realtimedj.com/cal/fl/powermixx.nsf/login.html'"
value="Client Login"><br>


Michel
Forced accept.

Computer101
EE Admin

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial