Programming Theory
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesProgramming Theory

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old October 5th, 2005, 09:11 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
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.

Reply With Quote
  #2  
Old October 23rd, 2005, 03:55 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: DOM Javascript - IE vs Firefox - hasChildNodes method

remove the javascript: from

onClick="javascript:indente(event)

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesProgramming Theory > DOM Javascript - IE vs Firefox - hasChildNodes method


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway