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>";
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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");'
To double check that try putting an alert in there so that you know that something is firing.
So put onclick='javascript:alert(
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.
<a href="/">Home</a>
You can style that link if you want to.
ASKER
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'></F ORM></div> ";
echo "<div id='home'><FORM><INPUT TYPE='button' VALUE='HOME' onClick=window.location='.
ASKER