Dom api - differences in browser


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.

                        newcell.innerHTML = taskColl[i].childNodes[j].text;
            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 :

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 Private Ltd 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.

Received on Thursday, 23 July 2009 05:50:59 UTC