What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » I need JScript DOM help.

I need JScript DOM help.
Author: Message:
Baggins
Full Member
***

Avatar
B000ALFAZO

Posts: 387
Reputation: 13
29 / Male / Flag
Joined: Oct 2006
O.P. I need JScript DOM help.
code:
<html>
<body>

<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>

<script language="Javascript">                   

var x = document.getElementsByTagName("div");
for (i=0;i<x.length;i++)
  {
      document.write(x[i].text.nodeValue);
  }
</script>

</body>
</html>


This should make a page that looks like
1
2
3
4
1234

but all i get is

1
2
3
4

i am using firefox 2.0.0.4, what's wrong?
08-25-2007 03:53 PM
Profile E-Mail PM Web Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: I need JScript DOM help.
How about using x[i].innerHTML ?
08-25-2007 06:12 PM
Profile PM Web Find Quote Report
Baggins
Full Member
***

Avatar
B000ALFAZO

Posts: 387
Reputation: 13
29 / Male / Flag
Joined: Oct 2006
O.P. RE: I need JScript DOM help.
It works, thanks Mnjul :>
08-25-2007 06:19 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On