473,231 Members | 1,904 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,231 software developers and data experts.

Table row does not align correctly in Mozilla when hidden and displayed

shane3341436
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>Untitled Document</title>
  6. </head>
  7.  
  8. <body>
  9. <form name="f1">
  10. <table width="1123">
  11.   <!--DWLayoutTable-->
  12. <tr>
  13.  
  14. <td width="160" height="22" valign="middle" class="small_font_grey"> <input type="radio" name="f1" value=0 onclick="selectf2(this.form)"  />
  15.   Hide            </td>
  16. <td width="360" valign="middle" class="small_font_grey"> <input type="radio" name="f1" value=1 onclick="selectf2(this.form)"  /> 
  17.   Show             </td>
  18. <td width="582">&nbsp;</td>
  19. </tr>
  20. <tr  align="center" >
  21.             <td  height="32" align="right" valign="middle" class="td_data_black">Field 1  :&nbsp; </td>
  22.             <td align="left" valign="top"  >
  23.               <input name="f3" type="text" id="f3"   />
  24.             Example 1</td>
  25.             <td  >&nbsp;</td>
  26.     </tr>
  27.  <tr id='divf2' align="center" style="display:none">
  28.             <td  height="32" align="right" valign="middle" class="td_data_black">Field 2  :&nbsp; </td>
  29.             <td align="left" valign="top"  >
  30.               <input name="f2" type="text" id="f2"   />
  31.             Example 2</td>
  32.             <td  >&nbsp;</td>
  33.  </tr>
  34.   </table>
  35. </form>
  36. </body>
  37. </html>
  38. <script>
  39.  
  40. function selectf2(form){
  41.  
  42.         if(form.f1[1].checked==true){
  43.             document.getElementById("divf2").style.display="block";
  44.  
  45.  
  46.         }
  47.         else if(form.f1[0].checked==true){
  48.             document.getElementById("divf2").style.display="none";
  49.  
  50.         }
  51. }
  52. </script>
It runs well on IE7 but not in mozilla. When rendered in mozilla the section which I want to hide and display do not align to same line as that of the upper section. When clicking on view source on mozilla browser the html tags are pretty good. I don't think there are any error. But still creating trouble in mozilla. Plz somebody help me to solve this problem.
Sep 19 '07 #1
6 3518
I used these codes for hiding and displaying an input field using the style property of 'tr' tag.
Sep 19 '07 #2
acoder
16,027 Expert Mod 8TB
Changed the thread title to better describe the problem.

For some reason, the table row is being squashed into one table cell space. I'll have to investigate this further.
Sep 19 '07 #3
Thanks for ur concern. Waiting for reply
Sep 21 '07 #4
acoder
16,027 Expert Mod 8TB
Thanks for ur concern. Waiting for reply
See this link. Firefox needs the display property to be set to "table-row", but since that wouldn't work in IE, use display set to "".
Sep 21 '07 #5
Thanx for ur help. It really does works.
Sep 27 '07 #6
acoder
16,027 Expert Mod 8TB
Glad to hear you got it working. Post again if you have any more questions.
Sep 27 '07 #7

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

Similar topics

1
by: ajay | last post by:
I have following code for a slide menu but i twiked it to work for a single level menu. Open it in a Browser to get a clear picture. I have 2 Qs 1) How to make first entry as non-link. i.e i...
1
by: Chris McGarry | last post by:
Hello, I'm new to style sheets and have been fighting with browser compatibility for two days. I'm developing a image selection page (similar to Ebay where the visitor can select and enlarge 1-6...
3
by: N. Demos | last post by:
I have a single row table with fixed dimensioned cells nested inside a fixed dimensioned div, which has overflow: hidden. The div's dimensions are such that It should only display the first two...
0
by: javaguy | last post by:
I have a table I hide show/hide through a pair of divs. The show/hide part works fine in both Mozilla and MSIE. When switching between the hide and show versions the Mozilla browser keeps them in...
1
by: cotton_gear | last post by:
Hello, Fiest of all let me thank this group for so quick in responding to any postings. I am using a javascript based utility from a site to sort the columns of the table. But, for some strange...
1
by: James Black | last post by:
I am dynamically generating a table in IE to display some information. I will probably change it to divs later, but I just want to get it working properly first. In my div I have the following...
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
1
by: smilecry | last post by:
I am trying to create a tree table (javascript code was adopted from online source) but the rowspan in td tag does not work well when I toggle the rows. Here is the sample code, notice the row "4"...
2
by: markszlazak | last post by:
I'm a relatively slow response of table cells changing their background color with mouseover/our in IE6 (Win 2K) but the response is fine (fast) in Firefox. Why? The code is below. Sorry about the...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.