User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the RSS, Web Services and SOAP section within the Web Development category of DaniWeb, a massive community of 426,634 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,575 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our RSS, Web Services and SOAP advertiser: Programming Forums

xmlDoc.transformNode is not a function (Error in Firefox)

Join Date: Dec 2007
Posts: 75
Reputation: hielo is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 10
hielo hielo is offline Offline
Junior Poster in Training

Re: xmlDoc.transformNode is not a function (Error in Firefox)

  #2  
Dec 8th, 2007
First of all, your code does not show where you initialized xmlDoc. I see xslDoc, but not xmlDoc. I assume this happens before the posted code.

With the assumptions above, the method "transformNode" is only valid for
xml objects created specifically for IE. In your code, this would be:
xslDoc=new ActiveXObject("Microsoft.XMLDOM");

However, the reason you get the error is because xmlDoc is not an ActiveXObject('Microsoft.XMLDOM'). FF does not support such object. It has its own object with its own methods.

The following page might be instructive if you want to pursue this route. Meaning, if you want to write your own "library". Section 8.13 uses the transformNode and shows you how to do the same for FF.
http://www.dcs.bbk.ac.uk/~ptw/teachi...t-2/notes.html

However, my recommendation is for you to download the Sarissa library. Basically, it is a library that takes care of these browser incompatibilities. Thus, you don't need to remember/learn the IE syntax and Firefox Syntax or whatever other browser syntax. You just need to learn the sarissa functions and how to use them to perform your transformations. Most often than not, once your script works on one browser, it automatically works on the others! I cannot stress enough how much of a head ache you will avoid by pursing this route instead. Good Luck.
Reply With Quote  
All times are GMT -4. The time now is 12:40 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC