This question undoubtedly has a simple answer however I have not been able to find it. I want to fire a javascript function on onmouseover but a page change onclick. Should I try to accomplish both in javascript or can I do the mouseover in javascript and the page change somehow in html.
This fires the javascript function fine.
<a href="javascript:void(0);" onmouseover="previewBox;">Preview</a>
However, the following is not working and I can’t figure out how to change page on click:
<a href="javascript:void(0);" onmouseover="previewBox;" onclick="newpage.php?p=1&q=3">Preview</a>
I can imagine creating a second javascript function to fire the php script where you pass all the parameters up to the javascript and then use it to launch the php script but that seems rather clumsy
Thanks for any simple suggestions.
What you are putting in the onclick handler, you should just put as the href: