WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 [ DOM ] node type, dreadcast, September 3, 2003
     Re:[ DOM ] node type, Chris, September 3, 2003
         Re:[ DOM ] node type, dreadcast, September 4, 2003
             Re:[ DOM ] node type, Erik Arvidsson, September 5, 2003

Subject: [ DOM ] node type From: dreadcast Date: September 3, 2003

Hello there,

I have :

<div id="select1">
 <div id="db1">tata</div>
 <div id="db2">toto</div>
 <div id="db3">titi</div>
 .....
</div>
<script type="text/javascript">
 alert (document.getElementById('select1').childNodes[0].id);
</script>

IE alerts "db1", but Mozilla alerts "undefined"...

In fact, Mozilla consider whitespaces (maybe also tabulations and linebreaks) as text nodes...

Is there anyway to  circumvent this problem ?

Thanks in advance




Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX