redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers
Monday 06 September 2010 14:23

Ask your IT question here

problem with IE and DOM



 
Post new topic   Reply to topic    Programming Forums -> JavaScript forum
View previous topic :: View next topic  
Author Message
jomanda
Enthusiastic Coder


Joined: 19 May 2006
Posts: 70
Location: Germany
Hi, I have a problem with IE and dom
I want to add a row to a table
I am looking for some javascript html parser

Reply with quote
 
Peter Pitt
Enthusiastic Coder


Joined: 20 May 2006
Posts: 114
Location: Egypt
Using xhr to fetch a document pretty much does that
Reply with quote
 
jomanda
Enthusiastic Coder


Joined: 19 May 2006
Posts: 70
Location: Germany
Hmm no I have a quit speicific problem
I have html returned from xhr. but this html is a <tr>...</tr>
In IE we cannot use innerHTML of a table because it is readonly

Reply with quote
 
Gladis
Enthusiastic Coder


Joined: 24 May 2006
Posts: 107
Why not just copy the DOMNode from the XHR resposne object?
Reply with quote
 
jomanda
Enthusiastic Coder


Joined: 19 May 2006
Posts: 70
Location: Germany
So to append the new row I need to convert the text into a dom structure and append it every piece to the table
Reply with quote
 
Gladis
Enthusiastic Coder


Joined: 24 May 2006
Posts: 107
if you're using XHR then, assuming you've set it up right, the response object *is* a DOM object
Reply with quote
 
jomanda
Enthusiastic Coder


Joined: 19 May 2006
Posts: 70
Location: Germany
I am using json
So resopnseText no responseXML
Without xhr is possible?
I have tried div.innerHTML = trText; doens't work
Ravael, is ok if I use Microsoft.XMLDOM instead of responseXML?

Reply with quote
 
Peter Pitt
Enthusiastic Coder


Joined: 20 May 2006
Posts: 114
Location: Egypt
it doesnt sound like that will work in browsers other than ie
Reply with quote
 
jomanda
Enthusiastic Coder


Joined: 19 May 2006
Posts: 70
Location: Germany
I won't use this technique in other browsers
I am using "table.appendChild(xmlDoc.documentElement);" but I don't see the new row rendered

Reply with quote
 
Page 1 of 1
Post new topic   Reply to topic    Programming Forums -> JavaScript forum


Dubai Forums - Expat Help | Vegan Forum | Java Programming | 3d Design Resources | 3d Forum | 3D Jobs | 3D Textures | Paris Forum | Europe Forum
Dubai Classifieds | Dubai Property | Jobs in Dubai | Free London Classifieds | Jobs in London UK

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Based on phpBB © 2001-2010 RedHo