| View previous topic :: View next topic |
| Author |
Message |
jomanda
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 |
| |
|
|
|
|
Peter Pitt
Joined: 20 May 2006 Posts: 114 Location: Egypt
|
| Using xhr to fetch a document pretty much does that |
| |
|
|
jomanda
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 |
| |
|
|
Gladis
Joined: 24 May 2006 Posts: 108
|
| Why not just copy the DOMNode from the XHR resposne object? |
| |
|
|
jomanda
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 |
| |
|
|
Gladis
Joined: 24 May 2006 Posts: 108
|
| if you're using XHR then, assuming you've set it up right, the response object *is* a DOM object |
| |
|
|
jomanda
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? |
| |
|
|
Peter Pitt
Joined: 20 May 2006 Posts: 114 Location: Egypt
|
| it doesnt sound like that will work in browsers other than ie |
| |
|
|
jomanda
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 |
| |
|
|
|