Jump to content

Recommended Posts

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

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.