473,414 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

hide show checkbox not working in IE

i have done a working code of visiblity of checkboxes depending upon the drop dwon selection.......it works fine with mozilla but its not working with the internet explorer......

my javascript code....

Expand|Select|Wrap|Line Numbers
  1. function showtr(show)
  2. {
  3.       document.getElementById(show).style.display = '';
  4. }
  5.  
  6. function hidetr(hide)
  7. {
  8.       document.getElementById(hide).style.display = 'none';
  9. }
  10.  



my HTML code...
Expand|Select|Wrap|Line Numbers
  1. <td><select name="jumpMenu" id="jumpMenu">
  2.       <option selected="selected">-</option>
  3.       <option onClick="showtr('one'); showtr('two'); showtr('three'); showtr('four'); hidetr('five');">Goa</option>
  4.       <option onClick="hidetr('one'); hidetr('two'); hidetr('three'); hidetr('four'); showtr('five');">Karnataka</option>
  5.  
  6.     </select>
  7.     </td>
  8.  
  9.  <td>
  10.  
  11.  
  12.     <table border="0">
  13.      <tr id="one" style="display:none;">
  14.  
  15.         <td>
  16.         <input type="checkbox" name="FieldData3" value="mpanjim" maxlength="100" size="30" id="name1" /></td>
  17.          <td class="cooltd"><label for="name1">Message To Panjim</label></td>
  18.       </tr>
  19.       <tr id="two" style="display:none;">
  20.         <td><input type="checkbox" name="FieldData5" value="mmargao" maxlength="100" size="30" id="name2" /></td>
  21.         <td class="cooltd"><label for="name2">Message to Margao</label></td>
  22.       </tr>
  23.       <tr id="three" style="display:none;">
  24.      <td><input type="checkbox" name="FieldData7" value="mvasco" maxlength="100" size="30" id="name3" /></td>
  25.        <td class="cooltd"><label for="name3">Message to Vasco</label></td>
  26.       </tr>
  27.       <tr id="four" style="display:none;">
  28.      <td><input type="checkbox" name="FieldData7" value="mponda" maxlength="100" size="30" id="name3" /></td>
  29.        <td class="cooltd"><label for="name3">Message to Ponda</label></td>
  30.       </tr>
  31.       <tr id="five" style="display:none;">
  32.          <td>
  33.          <input type="checkbox" name="FieldData11" value="mhubli" maxlength="100" size="30" id="name5" />
  34.         </td>
  35.         <td class="cooltd"><label for="name5">Message To Hubli</label></td>
  36.       </tr>
  37.  
how can i make it work in IE?????
can i get some help...?
Mar 11 '10 #1
1 3112
gits
5,390 Expert Mod 4TB
try to set display to 'block' ... instead off '' ...
Mar 11 '10 #2

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

Similar topics

9
by: sergio | last post by:
Hi all, I have created the following script that will show/hide a menu based on checkboxes. It works fine in Opera but not on IE6! Does anybody knows a workaround this problem? Thanks for your...
2
by: MOHSEN KASHANI | last post by:
Hi, I am trying to hide some form elements in a form by default and show/hide depending on which radio button is clicked. This is what I have but it is not working: <head> <style> ..noshow {...
4
by: jerryyang_la1 | last post by:
I've found this script that allows be to hide/show form elements.. <script language="JavaScript"><!-- var toggle = true; function show(object) { if (document.layers && document.layers)...
2
by: UJ | last post by:
Is there a way with a asp:checkbox to run a JavaScript to display/hide text/input on the screen without doing a postback? I also need to be able to access the stuff at the server so I need to...
1
by: asilverpeach | last post by:
Hey Guys! Found some great scripts here on this topic but have to make to changes to the code that I can't seem to figure out. First, In the following code clicking on the headers shows the...
4
by: somasekhar | last post by:
Does anyone know how to have a user click a checkbox to unhide a editfield Unclick of the checkbox would hide it again. There is an example of html file on the Javascript .But I want hide and unhide...
13
by: rupak | last post by:
Hi! I have a multiple selection of checkboxes <input type='checkbox' name='coffee' id='col1' value='Address'/> <input type='checkbox' name='coffee' id='col2' value='Name'/> <input...
1
by: student4lifer | last post by:
I got the javascript show() to work on <tdbut not on <tr>, once I moved the <divoutside the <tr>, it stop working. What am I missing? How would one fix this? Below is what I got. Thanks in...
1
by: filch | last post by:
Hi, I am new to this forum ... so hello to all! I am trying to get a script working which will show or hide a table based on a user checking or unchecking a parent checkbox. This is the...
0
Frinavale
by: Frinavale | last post by:
This code snippet is just a little bit of fun. It demonstrates how you use JavaScript and CSS to show or hide columns in a table depending on whether or not a checkbox corresponding with the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.