473,651 Members | 2,742 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

hide show checkbox not working in IE

1 New Member
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 3133
gits
5,390 Recognized Expert Moderator Expert
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
2752
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 response. Sergio ------------------------------------------------ <script language="JavaScript" type="text/javascript">
2
12182
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 { display: none; }
4
7994
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) document.layers.visibility = 'visible'; else if (document.all) { document.all.style.visibility = 'visible';
2
14632
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 have run=server with it. TIA - Jeff.
1
16740
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 div information. I want a nested show hide element though. So when you click on "Do you have carpets to be cleaned?" Small Rooms & Medium Rooms appears (that I got working) But Then when you click on Small rooms or medium rooms i want the three lines...
4
3065
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 same as in xml file plz give me the answer with example any body knows. <html> <head> <title>CB Hide/Show</title> <script type="text/javascript"> <!-- function showMe (it, box) { var vis = (box.checked) ? "block" : "none";...
13
7533
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 type='checkbox' name='coffee' id='col3' value='ID'/> <input type='checkbox' name='coffee' id='col4' value='UserName'/> <input type='checkbox' name='coffee' id='col5' value='Code'/>
1
1106
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 advance. =========== <head> <script type="text/javascript"> <!--
1
1612
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 script I have come up with so far (note that one of my issues is whether or not you can use an if/else construct inside of a case statement): function showIt($id) { alert("ID is : $id"); switch ($id) {
0
8969
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 column is checked. <html> <head> <script type="text/javascript"> function ShowHideField(header, gridID, checkboxElement) { var theGrid = document.getElementById(gridID); var displayValue;
0
8803
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8465
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8581
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7298
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5612
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1910
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.