Link to home
Start Free TrialLog in
Avatar of genesisvh
genesisvh

asked on

Home button not working

The button appears but nothing happens. What am I doing wrong?
echo "<div id='home'><FORM><INPUT TYPE='button' VALUE='HOME' onClick='location.href=../../index.html'></FORM></div>";

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of haloexpertsexchange
haloexpertsexchange
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of genesisvh
genesisvh

ASKER

No that didn't work either
is the onclick firing at all?
To double check that try putting an alert in there so that you know that something is firing.
So put onclick='javascript:alert("this is the onclick");'
Avatar of Paul MacDonald
Is the page two levels deep in your site?  What if you used "/index.html" instead of "../../index.html"?
How about just this:

<a href="/">Home</a>

You can style that link if you want to.
It did work just had to work the syntax error.
echo "<div id='home'><FORM><INPUT TYPE='button' VALUE='HOME' onClick=window.location='../../index.html'></FORM></div>";