ldb358 Posted August 19, 2009 Share Posted August 19, 2009 what i would like to to do is be able to(for the people with javascript off) have the link link to an alternative page, right now the page has a drop down box with form in it heres what i have: <a href='index.php?action=comment&id=$id' id='$i' onclick='grow($i,".$photo['id'].")'>rate and comment</a> the problum is it goes directly to the link instead of running the javascript thanks in advance Link to comment https://forums.phpfreaks.com/topic/171041-runing-javascript-as-default-link-as-back-up/ Share on other sites More sharing options...
corbin Posted August 19, 2009 Share Posted August 19, 2009 Try: onclick="blah(); return false;" The return false will prevent the browser from following the link. Link to comment https://forums.phpfreaks.com/topic/171041-runing-javascript-as-default-link-as-back-up/#findComment-902121 Share on other sites More sharing options...
ldb358 Posted August 19, 2009 Author Share Posted August 19, 2009 thank you very much Link to comment https://forums.phpfreaks.com/topic/171041-runing-javascript-as-default-link-as-back-up/#findComment-902127 Share on other sites More sharing options...
corbin Posted August 20, 2009 Share Posted August 20, 2009 No problem . Link to comment https://forums.phpfreaks.com/topic/171041-runing-javascript-as-default-link-as-back-up/#findComment-902209 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.