473,804 Members | 3,353 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE not showing a table inside a div

12 New Member
Hi,
I'm constructing some HTML elements dynamically using javascript, the result looks fine in Firefox but IE 6 refuses to show some tables I've got inside Divs.

My code is a bit big so I'll only post the bit in question. Indentation is just for keeping track of where each tag is.

Why does IE behave this way?

Cheers,
Jon

Expand|Select|Wrap|Line Numbers
  1. var optionsDiv = document.createElement('div');
  2.     optionsDiv.className = 'ccLayerOptionsOverlayOptions';
  3.     optionsDiv.id = divId;
  4.     //Table with options
  5.     var table = document.createElement('table');
  6.         var opacityTr = document.createElement('tr');
  7.             var opacityLabel = document.createElement('td');
  8.                 opacityLabel.innerHTML = '<b>Opacity: </b>';
  9.             var opacityControls = document.createElement('td');
  10.                 var opacityValue = document.createElement('input');
  11.                     opacityValue.id = opId;
  12.                     opacityValue.className = 'opacity';
  13.                     opacityValue.type = 'text';
  14.                     opacityValue.value = '1.0';
  15.                     opacityValue.disabled = true;
  16.                 var decOpacity = document.createElement('a');
  17.                     decOpacity.title = 'decrease opacity';
  18.                     decOpacity.href = "javascript: ChangesClient.Util.changeOpacity(-0.1,ChangesClient.map.getLayer('" + divId + "'),'" + opId + "')";
  19.                     var minImg = document.createElement('img');
  20.                         minImg.className = 'button';
  21.                         minImg.src = ChangesClient._getScriptLocation() + "lib/styles/minus.jpg";
  22.                     decOpacity.appendChild(minImg);
  23.                 var incOpacity = document.createElement('a');
  24.                     incOpacity.title = 'increase opacity';
  25.                     incOpacity.href = "javascript: ChangesClient.Util.changeOpacity(0.1,ChangesClient.map.getLayer('" + divId + "'),'" + opId + "')";
  26.                     var plusImg = document.createElement('img');
  27.                         plusImg.className = 'button';
  28.                         plusImg.src = ChangesClient._getScriptLocation() + "lib/styles/plus.jpg";
  29.                     incOpacity.appendChild(plusImg);
  30.                 opacityControls.appendChild(opacityValue);
  31.                 //opacityControls.appendChild(" ");
  32.                 opacityControls.appendChild(decOpacity);
  33.                 //opacityControls.appendChild(" ");
  34.                 opacityControls.appendChild(incOpacity);
  35.             opacityTr.appendChild(opacityLabel);
  36.             opacityTr.appendChild(opacityControls);
  37.         var posTr = document.createElement('tr');
  38.             var posLabel = document.createElement('td');
  39.                 posLabel.innerHTML = '<b>Change Position: </b>';
  40.             var posControls = document.createElement('td');
  41.                 var posUp = document.createElement('a');
  42.                     posUp.title = 'move layer up';
  43.                     posUp.href = "javascript: ChangesClient.layerOptionsPanel.changeLayerIndex('" + divId + "',1)";
  44.                     posUp.innerHTML = 'up';
  45.                 var posDown = document.createElement('a');
  46.                     posUp.title = 'move layer down';
  47.                     posUp.href = "javascript: ChangesClient.layerOptionsPanel.changeLayerIndex('" + divId + "',-1)";
  48.                     posUp.innerHTML = 'down';
  49.                 if (layerIndex < maxOverlayIndex) {
  50.                     posControls.appendChild(posUp);
  51.                     if (layerIndex > minOverlayIndex) {
  52.                         //posControls.appendChild(" | ");
  53.                         posControls.appendChild(posDown);
  54.                     }
  55.                 } else if (layerIndex > minOverlayIndex) {
  56.                     posControls.appendChild(posDown);
  57.                 }
  58.             posTr.appendChild(posLabel);
  59.             posTr.appendChild(posControls);
  60.         table.appendChild(opacityTr);
  61.         table.appendChild(posTr);
  62.     optionsDiv.appendChild(table);
  63.  
Feb 14 '08 #1
3 3018
acoder
16,027 Recognized Expert Moderator MVP
IE for some reason requires the tbody tag. You will need to append the table rows to the tbody which should be appended to the table tag.
Feb 14 '08 #2
clivethebadger
12 New Member
Thanks, I should have known that really!

Cheers,
Jon
Feb 15 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
No problem. You're welcome!
Feb 15 '08 #4

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

Similar topics

2
2226
by: c.anandkumar | last post by:
Hi All - I have some problems getting a small piece of javascript working correctly for Firefox. Here is what I am trying to do - 1. I have a form (like a search form) 2. I have many groups of searchable fields in the fields 3. Each group can be expanded/collapsed by clicking on a link "(Fewer|More) Options" which sits right next to the group title.
1
5150
by: Gh! | last post by:
How can I see how much disk space is being occupied by an InnoDB table? Looking into /var/lib/mysql doesn't seem to work anymore for InnoDB tables. Please tell also if there is a way to see how much space is occupied by a particular row or column of a table. Thanks
1
2730
by: Rich | last post by:
Hello, I am trying to draw a graph on a form. I can draw the box using drawline, and bars inside the box using drawrectangle, but when I try to draw a line inside the box the inner lines are not showing up. Do I need to use a property or something? Here is the code for my lines
5
2122
by: outstretchedarm | last post by:
I'm extremely new to javascript and to programming in general. I am trying to create an interactive table. I have already created the table with constants, in the key of C (it is for music). what I would like to do is to create a dropdown box that would enable the user to select all 12 keys, then based on that choice, have the whole table re-calculate, basically transposing all the data up or down. how would I go about doing this.
5
2883
nmm32
by: nmm32 | last post by:
I have a DataGrid which displays data with the aid of a procedure. I have tested the procedure inside the database and it is working fine. I have another procedure which adds another row to the table, which is working fine inside the programming, and in the database. However, I still cannot figure out what am I doing wrong with the DataGrid configurations OR Database OR DataAdapter OR SqlSelectCommand ... I really don't know yet and I...
0
1775
by: cms3023 | last post by:
I have a DataGrid which displays data with the aid of a procedure. I have tested the procedure inside the database and it is working fine. The table inside the database has data that matches with the parameter. I have another procedure which adds another row to the table, which is working fine inside the programming, and in the database. However, I still cannot figure out what am I doing wrong with the DataGrid configurations OR...
3
3566
by: reelrave | last post by:
Hello All, I've checked around a little on Google (and this group) and have found info similar to what I'm trying to do (i.e., changes that were made in the BE's tables are not reflected in the FE database) and have heard suggestions using code, etcetera. But I need a bit more clarification please. What I'm doing/have done is this (MS Access 2007, FE stored on WXP clients, BE stored on a W2K3 server):
2
1652
by: bnashenas1984 | last post by:
Hi everyone I have a table in MySQL which contains menus and submenus. Table : + ID + Parent ID + Name + | 1 | 0 | Computer | | 2 | 0 | furniture | | 3 | 1 | Software | | 4 | 1 | Hardware |
0
1275
by: sarangrao | last post by:
i created one sqldatareader that reads parent table records. While(dr.Read()) inside this while i create another sqldatareader and new command that reads child table records.but it is giving an error while executing second datareader that please close the first datareader(which is accessing parent table records.) How to do that
0
9591
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10594
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
10331
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
9166
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...
1
7631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6861
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();...
1
4306
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
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
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.