User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 363,798 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 4,633 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 JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

How to make these Javascript codes work in Firefox too

Join Date: May 2008
Posts: 2
Reputation: cariocgl is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
cariocgl cariocgl is offline Offline
Newbie Poster

How to make these Javascript codes work in Firefox too

  #1  
May 6th, 2008
------------PART ONE------------------

  1. if(navigator.appName == "Netscape"){
  2. xmlHttp = new XMLHttpRequest();
  3. xmlHttp.open("GET",xmlfile , false);
  4. xmlHttp.send(null);
  5. docObj = xmlHttp.responseXML;
  6. var objNodesname = docObj.getElementsByTagName("name");
  7. }else{
  8. var docObj = new ActiveXObject("MSXML.DOMDocument");
  9. docObj.load(xmlfile);
  10. var objNodesname = docObj.getElementsByTagName("name");
  11. }

------------PART TWO------------------

  1. for (i = 0 ; i < objNodesnames.length ; i++) {
  2. if(navigator.appName == "Netscape"){
  3. objcurrent=objNodesnames.item(i);
  4. myceltext=objcurrent.childNodes.item(0);
  5. currenttext=document.createTextNode(myceltext.data);
  6. lstring=currenttext.data;
  7. lstring=lstring.substr(4)
  8. lstringcode=lstring.substr(0,4)
  9.  
  10. }else{
  11. lstring=objNodesnames.item(i).text;
  12. lstringcode=lstring.substr(0,4);
  13. lstring=lstring.substr(4);
  14. }
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 11:09 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC