By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,009 Members | 1,487 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,009 IT Pros & Developers. It's quick & easy.

Ondblclick with Combobox not working in Firefox

P: 2
Hello Experts... I am using an ondblclick in a combo box and it works perfectly in IE but not in Firefox. I do not get an error code, it just doesn't work. here is the code:
Expand|Select|Wrap|Line Numbers
  1.  
  2. <html>
  3. <head>
  4. <title>Hide Me</title>
  5. <script type="text/javascript">
  6. function xSwitchTxt(msg) {
  7.  
  8.     //alert(msg);
  9.     document.getElementById(msg+"EventOther").style.display='none';
  10.     document.getElementById(msg+"Event").style.display='block';
  11. }
  12. function xSwitchCombo(msg) {
  13.  
  14.    // alert(msg);
  15.    document.getElementById(msg+"Event").style.display='none';
  16.    document.getElementById(msg+"EventOther").style.display='block';
  17. }
  18. function xHide(msg) {
  19.    document.getElementById(msg).style.display='none';
  20. }
  21. </script>
  22. </head>
  23. <body>
  24. <table border="1" width="500">
  25.     <tr>
  26.         <td bgcolor="#FFFFCC">
  27.         <p align="center"><b><font size="4">Select your name.  </font></b></p>
  28.         <p align="center"><b><font size="4">If it's not there Double click the input box and enter.</font></b></td>
  29.     </tr>
  30.     <tr>
  31.         <td bgcolor="#CCFFCC"><form id="form1" name="form1" method="post" action="" >
  32. <p align="center"><br>
  33.  
  34. <select id="L1Event" name="L1Event" ondblclick="xSwitchCombo('L1');" size="1" >
  35. <option></option>
  36. <option>John</option>
  37. <option>Tony</option>
  38. </select></p>
  39. <p align="center">
  40. <input id="L1EventOther" name="L1EventOther" ondblclick="xSwitchTxt('L1');" size="30"><br>
  41. Double Click the input box to toggle between boxes</p>
  42. <script>
  43.                 xHide('L1EventOther');
  44.             </script>
  45.  
  46. </form></td>
  47.     </tr>
  48. </table>
  49.  
  50. </body>
  51. </html>
  52.  
I am using Firefox ver: 31 on a win7 system

This functionality is used when alternate data needs to be added to the database. The recommended list of selections reside in the combobox. The reason it is in an ASP extension, I have other ASP code working. I created the attached code for simplicity.
Any assistance is greatly appreciated...John
Sep 12 '14 #1
Share this Question
Share on Google+
1 Reply


P: 2
Is it normal that it takes more than four days to receive a response? So far 150 plus views and nothing. I would really appreciate some assistance.

Thank you, John
Sep 16 '14 #2

Post your reply

Sign in to post your reply or Sign up for a free account.