W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2009

Re: Dom api - differences in browser

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Thu, 23 Jul 2009 14:47:13 -0700
Message-ID: <c9e12660907231447u3f645d7dhe37a8a1df51d3374@mail.gmail.com>
To: Martijn <martijn.martijn@gmail.com>
Cc: Preetha <PREETHA.R@sellasynergy.com>, "www-dom@w3.org" <www-dom@w3.org>
On Thu, Jul 23, 2009 at 10:00 AM, Martijn<martijn.martijn@gmail.com> wrote:
> The .text property doesn't exist, you could use the .textContent
> property instead.
>

There is a "text" property on something.

javascript: alert( "text" in document.createElement("SCRIPT"))

elerts "true"

I'd suggest reading:

http://jibbering.com/faq/

. There are some valuable online resources listed in the resources section.

 The section on debugging mentions IE Web Developer Toolbar, Firebug,
and others.

The section about posting will help you to ask "smart questions", so
that when you post on comp.lang.javascript, you'll improve your
changes of a helpful answer (generally the "it doesn't work" type of
question gets negative responses).

Best regards,

Garrett

> Regards,
> Martijn
>
> On Wed, Jul 22, 2009 at 11:35 AM, Preetha<PREETHA.R@sellasynergy.com> wrote:
>> Hi,
>>
>>
>>
>> I have a problem when using dom api , when executed in different browsers.
>>
>>
>>
>> I have to check for the browser type before using the dom api. For example
>> the text property works with IE 6.0
>>
>> But does not work with fire fox 3. So I have to
>> taskColl[i].childNodes[j].childNodes[0].nodeValue to get the same value.
>>
>>
>>
>> Is there any common method in which all the browsers read or common api that
>> can be applied across browser.Please help , this is one case I have
>> mentioned , there are lot many compatibility issues.
>>
>>
>>
>>  if(document.all){
>>
>>                         newcell.innerHTML = taskColl[i].childNodes[j].text;
>>
>>  }else{
>>
>>             newcell.innerHTML =
>> taskColl[i].childNodes[j].childNodes[0].nodeValue;
>>
>>  }
>>
>>
>>
>> Advanca thanks and Regards,
>>
>> R Preetha
>>
>> Sella Synergy India Ltd
>>
>> El Net IT park | Taramani |  Chennai
>>
>> Mail : preetha.r@sella.it
>>
>>
>>
>> Le e-mail provenienti dalla Sella Synergy India Private Ltd sono trasmesse
>> in buona fede e non comportano alcun vincolo ne' creano obblighi per la
>> Sella Synergy India Private Ltd stessa, salvo che cio' non sia espressamente
>> previsto da un precedente accordo.
>> Questa e-mail e' confidenziale. Qualora l'avesse ricevuta per errore, La
>> preghiamo di comunicarne via e-mail la ricezione al mittente e di
>> distruggerne il contenuto. La informiamo inoltre che l'utilizzo non
>> autorizzato del messaggio o dei suoi allegati potrebbe costituire reato.
>> Grazie per la collaborazione.
>>
>> E-mails from Sella Synergy India Ltd Private are sent in good faith but they
>> are neither binding on the Sella Synergy India Private Ltd nor to be
>> understood as creating any obligation on its part except where provided for
>> an agreement.
>> This e-mail is confidential. If you have received it by mistake, please
>> inform the sender by reply e-mail and delete it from your system. Please
>> also note that the unauthorized disclosure or use of the message or any
>> attachments could be an offence.
>> Thank you for your cooperation.
>
>
>
> --
> Martijn Wargers - Help Mozilla!
> http://quality.mozilla.org/
> http://wiki.mozilla.org/Mozilla_QA_Community
> irc://irc.mozilla.org/qa - /nick mw22
>
>
Received on Thursday, 23 July 2009 21:47:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:03 GMT