phonglo
06-13-2001, 05:20 PM
Can anyone help on how to compare two objects in NS6?
ex:
<div id="obj1">first object</div>
<div id="obj2">second object</div>
In Explorer, it was easy. You would compare them like this... if(obj1.id==obj2.id)do something;
How do you do it in NS6?
This doesn't work for me:
if(document.getElementById("obj1").id==document.getElementById("obj2")
do something;
ex:
<div id="obj1">first object</div>
<div id="obj2">second object</div>
In Explorer, it was easy. You would compare them like this... if(obj1.id==obj2.id)do something;
How do you do it in NS6?
This doesn't work for me:
if(document.getElementById("obj1").id==document.getElementById("obj2")
do something;