helloise Posted May 3, 2011 Share Posted May 3, 2011 how can i do this pls? i just want to display a link "Free Chat" when i click on it, it must display a dropdown with options "yes" and "no" the link must not go anywhere yet, only when yes is selected it must go to a page i have the code: <a href="" id="link" name="link" onClick="yesnolist(1)">Free Chat</a> then i have javascript: <script type="text/JavaScript"> function yesnolist() { var e = document.getElementById("link"); var strUser1 = e.options[e.selectedIndex].value; if (strUser1 == "1") { window.location.href = "http://........."; } return strUser1; } </script> the above is not correct, can some-one help me please? thanks Link to comment https://forums.phpfreaks.com/topic/235410-click-on-link-to-display-dropdown-help-needed-pls/ Share on other sites More sharing options...
spiderwell Posted May 3, 2011 Share Posted May 3, 2011 not in this section well you might get lucky, but you should ask a move to move this to javascript Link to comment https://forums.phpfreaks.com/topic/235410-click-on-link-to-display-dropdown-help-needed-pls/#findComment-1209811 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.