Click to See Complete Forum and Search --> : problem accesing id with nn


role
07-15-2003, 12:55 PM
hello, how to access several same id??
in ie, i use myelementid.length and then iterate it with myelementid[0]
but nn not recognized it...
i tried document.getElementById('myelementid').length
and definitely not working!

thanxx

pyro
07-15-2003, 01:03 PM
What version of NN? NN4.x doesn't support getElementById...

role
07-16-2003, 12:20 AM
huh? i use nn7.0 and ie6.0
so how to access element in nn4.x?? is it using document.all?
woah this javascript makes a lot of headache :(
anyway, is css all browser compatible?
what's the difference of javascript and dhtml??
which one is all browser compatible?

thanxx a lot

role
07-16-2003, 09:00 AM
similar to this script in nn

element.position = "relative";
element.style.left = 10;

and this one:

var myelement
function test(element) {
myelement = element
}

thank you very much

Moderators Note

Posting same question multiple times does not increase your chance of getting a response faster.

role
07-16-2003, 09:44 AM
sigh* no one can help me

pyro
07-16-2003, 09:46 AM
Try document.layers, document.all is IE4

Khalid Ali
07-16-2003, 09:46 AM
You have to be more clear iun your question...

which version of NN and equivalent code in NN for the piece of code you posted?

role
07-18-2003, 01:11 PM
i use ie 6.0 and nn 7.0

similar to this script in nn 7.0

pheader[0].position = "relative";
pheader[0].style.left = 10;

and the other one:

for (i=0;i<pheader.length;i++) {
pheader[i].innerHTML = "test";
}

in html

<a id="pheader">header 1</a>
<a id="pheader">header 2</a>
....

and how to use document.layer?? sorry i'm a big noob in javascript :)

thanxx