I have a form with a dropdown list that when they click on it or when they mouseover it (either would be ok) it should show a popup tooltip. My javascript skills are at best very very basic. This is a wordpress site and I am reluctant to add jquery to the mix so just a pure javascript solution would be great.

I tried just putting a text label but that didn't work. I tried the following simple javascript:

                   <script>
                   function popMssg(message)
                   {
                       alert(message);
                   }
                   </script>


and used <option value='Board of Directors' onclick=popMssg('The Board of Directors sets overall policy for the organization.'>Board of Directors</option>\n";

But that didn't work. Any suggestions?

Thanks/hal

<option value="some value" onclick="popMssg('some message');">some label</option>

you may also need to escape quotes if you are doing this in PHP.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.