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

Problem with IE. Please help.

Hi

I have JS code to create table:

var oTableRows = null;
var oTableCols = null;
var iMainIntrCount = aMI.length/5;
var iTableRows = Math.ceil(iMainIntrCount/7);
var oMainIntrTable = document.getElementById('mainTopics');

for(var iRows=0; iRows < iTableRows; iRows++){
oTableRows = document.createElement('tr');
for(var iCols=0; iCols<7; iCols++){
oTableCols = document.createElement('td');
oTableCols.innerHTML = 'Sample Text';
oTableRows.appendChild(oTableCols);
}
oMainIntrTable.appendChild(oTableRows);
}

It works perfectly in FF but in IE i don't get anything. What do I do wrong?

Thank you for help.
--

Ralph
Jan 22 '07 #1
3 988
VK

Ralph wrote:
It works perfectly in FF but in IE i don't get anything. What do I do wrong?
You should add rows not to table itself, but to tbody:

tableObject.tbodies[0].addRow(rowObject);

Jan 22 '07 #2
VK wrote:
Ralph wrote:
>It works perfectly in FF but in IE i don't get anything. What do I do wrong?

You should add rows not to table itself, but to tbody:

tableObject.tbodies[0].addRow(rowObject);
Thank you.

--

Ralph
Jan 22 '07 #3
Ralph wrote:
Hi

I have JS code to create table:

var oTableRows = null;
var oTableCols = null;
var iMainIntrCount = aMI.length/5;
var iTableRows = Math.ceil(iMainIntrCount/7);
var oMainIntrTable = document.getElementById('mainTopics');

for(var iRows=0; iRows < iTableRows; iRows++){
oTableRows = document.createElement('tr');
for(var iCols=0; iCols<7; iCols++){
oTableCols = document.createElement('td');
oTableCols.innerHTML = 'Sample Text';
oTableRows.appendChild(oTableCols);
}
oMainIntrTable.appendChild(oTableRows);
}

It works perfectly in FF but in IE i don't get anything. What do I do
wrong?

Thank you for help.
Prefer table (or thead/tbody).insertRow() and row.insertCell() methods
rather than appendChild. Less typing and table.insertRow() will create
and add to a tbody if the table does not have one.

--
Ian Collins.
Jan 22 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: newbie_mw | last post by:
Hi, I need urgent help with a novice problem. I would appreciate any advice, suggestions... Thanks a lot in advance! Here it is: I created a sign-up sheet (reg.html) where people fill in their...
11
by: Kostatus | last post by:
I have a virtual function in a base class, which is then overwritten by a function of the same name in a publically derived class. When I call the function using a pointer to the derived class...
3
by: Spacy | last post by:
Am creating a HTML Report in asp.net. To save this report to excel on client-side, i write this code: Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("content-disposition",...
0
by: Kurt Watson | last post by:
I’m having a different kind of problem with Hotmail when I sign in it says, "Web Browser Software Limitations Your Current Software Will Limit Your Ability to Use Hotmail You are using a web...
28
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
9
by: Rajat Tandon | last post by:
Hello there, I am relatively new to the newsgroups and C#. I have never been disappointed with the groups and always got the prompt replies to my queries.This is yet another strange issue, I am...
5
by: Hari | last post by:
Guys please help me to solve this strange problem what Iam getting as follows.. Trying to instantiate a global instance of a template class as follows :- when i build this code with debug and...
11
by: ASP newbie | last post by:
I cannot run my asp.net application in w2k server. But the program works fine under w2k professional. Can anyone tell me is there any difference in the settings? Many thanks.
1
by: funfair | last post by:
HI,EVERY ONE first problem, i have create a database in access 2003 it worked fine untill i have format my laptop . now im working on office 2003 on windows xp and i have norton 2006 but im...
2
by: cty0000 | last post by:
Please anybody help me... I have some serious problem.. I'm doing to keep equpiment list(string).. In my code, there are 3 page which are having 4 equpiment ID (user control.) like this...
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.