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

javascript added elements in div not showing in ie

Hi all,

I have a javascript that create table and field elements dynamically in
a hidden div, and when I trigger to display the div, the elements I
created in div does not show in ie, but it works fine on firefox, why?

Thanks.

Jul 23 '05 #1
6 2568
gl**@tollnz.co.nz wrote:
Hi all,

I have a javascript that create table and field elements dynamically in
a hidden div, and when I trigger to display the div, the elements I
created in div does not show in ie, but it works fine on firefox, why?


At a guess because IE doesn't like your code.
--
Zif
Jul 23 '05 #2

Zifud wrote:
gl**@tollnz.co.nz wrote:
Hi all,

I have a javascript that create table and field elements dynamically in a hidden div, and when I trigger to display the div, the elements I
created in div does not show in ie, but it works fine on firefox, why?


At a guess because IE doesn't like your code.
--
Zif

if you are useing document.getElementId then you may need to set the
page into compatability mode for IE6 to work - or detect the browser
type and use document.all instead.

Jul 23 '05 #3
ma********@yahoo.com wrote:
Zifud wrote:
gl**@tollnz.co.nz wrote:
Hi all,

I have a javascript that create table and field elements
dynamically in
a hidden div, and when I trigger to display the div, the elements I
created in div does not show in ie, but it works fine on firefox,


why?
At a guess because IE doesn't like your code.
--
Zif


if you are useing document.getElementId then you may need to set the
page into compatability mode for IE6 to work - or detect the browser
type and use document.all instead.


Or it could be adding table elements using innerHTML, or it could be
adding table elements to the table, not the body, or it could be a
conflict in the HTML that is tolerated by Firefox but not IE, or it
could be...

The OP didn't bother to post code or even hint at the method used to
create the new elements, so how accurate will any guess at a solution
be?

--
Zif
Jul 23 '05 #4
gl**@tollnz.co.nz wrote:
I have a javascript that create table and field elements dynamically
in a hidden div, and when I trigger to display the div, the elements I
created in div does not show in ie, but it works fine on firefox, why?


Probably you did not create a TBODY element, and tried to add TR elements
to a TABLE element instead of adding it to a TBODY element, what MSIE
silently ignores.

ciao, dhgm
Jul 23 '05 #5
ma********@yahoo.com wrote:

[snip]
if you are useing document.getElementId then you may need to set the
page into compatability mode for IE6 to work
Not at all. Though IE's implementation of most DOM methods (including
gEBI) is contrary to specification in both Standards and Quirks mode, it
"works" in both nevertheless.
or detect the browser type and use document.all instead.


The all collection should be all but deprecated in IE except for IE4,
and IE5.x as a replacement for

document.getElementsByTagName('*')

In this latter case, IE5.x doesn't recognise an asterisk (*) as a value,
which matches all elements.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #6
thanks guys, I don't have tbody in html.

Jul 23 '05 #7

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

Similar topics

13
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
1
by: Ryann | last post by:
I hate javascript looking for help. I am trying to pass hidden fields around without showing a query string in the address bar. e.g. formA.asp not formA.asp?var1=blah&var2=blah I have...
5
by: Robin Becker | last post by:
I'm trying to fix a problem in IE 5.2 javascript on mac OS 10.2. Basically the problem is that we're writing dynamic form elements and these don't seem to be recognized by the form. The code...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
7
by: Elizabeth Barnwell | last post by:
This may be a useful tool to better understand & find Javascript concepts: http://www.yoyobrain.com/subjects/show/240 Add flashcards to your studies, click on cram with the learning wizard. ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.