|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
DOM Javascript - IE vs Firefox - hasChildNodes method
Hello.
I'm doing a javascript code using the function hasChildNodes. Here is a part of this code : function indente(event) { spanRow = eventTarget(event).parentNode.parentNode; spanMain = spanRow.parentNode; spanCloned = spanRow.cloneNode(true); ... alert(spanCloned.childNodes[1].hasChildNodes()); ... } function eventTarget(event){ if (event.target) return event.target; if (event.srcElement) return event.srcElement; } I call this function like this : <input type="button" id="indent" value=" > " onClick="javascript:indente(event)"/> My problem is that on the alert box Firefox tells me 'true' and Internet Explorer tells me 'false'. Where does it come from ? Thanks for your help. Mickael. |
|
#2
|
|||
|
|||
|
RE: DOM Javascript - IE vs Firefox - hasChildNodes method
remove the javascript: from
onClick="javascript:indente(event) |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Programming Theory > DOM Javascript - IE vs Firefox - hasChildNodes method |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|