We help IT Professionals succeed at work.

HTML code for button to open another web page

powermixx
powermixx asked
on
11,598 Views
Last Modified: 2012-06-27
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

Development Team Lead
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Commented:
crap..too slow
Michel PlungjanIT Expert
CERTIFIED 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

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions