Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Loading Xml using Javascript -Safari Browser

Loading Xml using Javascript -Safari Browser

Scheduled Pinned Locked Moved Web Development
javascripttoolsxmlhelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vijayitsb
    wrote on last edited by
    #1

    I am Loading Xml file using javascript. Its working fine in IE and Firefox but Its not working safari. This is My code. if( window.ActiveXObject && /Win/.test(navigator.userAgent) ) { LoadXml = new ActiveXObject("Msxml.DOMDocument"); LoadXml.async = false; LoadXml.onreadystatechange = function () { if (LoadXml.readyState == 4) ManipulateXML(Id); } LoadXml.load("../../Common_Inc/link.xml"); } else if( document.implementation && document.implementation.createDocument ) { LoadXml = document.implementation.createDocument("","",null); //LoadXml = new ActiveXObject("Microsoft.XMLHTTP"); LoadXml.async = false; var loaded = LoadXml.load("../../Common_Inc/link.xml"); moz=1; if (loaded) { ManipulateXML(Id); } //alert("Test13"); } else { alert("Your browser can\'t handle this script"); return; } Im getting Error in safari Browser while loading the Xml file. Do u know any Alternate methods which is working in all browser ?

    Cheers..! Vijay s

    S 1 Reply Last reply
    0
    • V Vijayitsb

      I am Loading Xml file using javascript. Its working fine in IE and Firefox but Its not working safari. This is My code. if( window.ActiveXObject && /Win/.test(navigator.userAgent) ) { LoadXml = new ActiveXObject("Msxml.DOMDocument"); LoadXml.async = false; LoadXml.onreadystatechange = function () { if (LoadXml.readyState == 4) ManipulateXML(Id); } LoadXml.load("../../Common_Inc/link.xml"); } else if( document.implementation && document.implementation.createDocument ) { LoadXml = document.implementation.createDocument("","",null); //LoadXml = new ActiveXObject("Microsoft.XMLHTTP"); LoadXml.async = false; var loaded = LoadXml.load("../../Common_Inc/link.xml"); moz=1; if (loaded) { ManipulateXML(Id); } //alert("Test13"); } else { alert("Your browser can\'t handle this script"); return; } Im getting Error in safari Browser while loading the Xml file. Do u know any Alternate methods which is working in all browser ?

      Cheers..! Vijay s

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      Vijayitsb wrote:

      Do u know any Alternate methods which is working in all browser ?

      Yeah: http://developer.apple.com/internet/webcontent/xmlhttpreq.html[^]

      Citizen 20.1.01

      'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups