SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Dec 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    transformNode not working in firefox

    Hi All,

    I have my javscript code as following to apply xslt for the xml content present inside a div tag. This code works in ie. But not working in FireFox , Safari.

    var strStyle = document.getElementById(“sStyle”).XMLDocument;
    document.getElementById(“wd”).innerHTML = document.getElementById(“forxml”).transformNode(“strStyle”);

    here is the piece of code in my asp file where the xml transformation is taking place.

    <XML ID="forxml" HEIGHT="0" WIDTH="0"><%=sentence%></XML>
    <XML ID="sStyle" SRC="aod.xsl"></XML>

    <div id =”wd”></div>

    the asp variable sentence holds the xml tag information .

    This code works perfectly in Internet Explorer and the styles are applied. But its not at all working in FireFox. styles are not applied.

    Its displaying error message as “transformNode not a function in firefox”


    Please give me suggestions how to rectify this…. Really struggling with this for the whole week..

    Thanks in advance.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •