3 Replies Latest reply on May 24, 2006 9:09 AM by Dan Bracuk

    innerHTML

    credev
      Hello,

      anyone has a function to put innerHTML for a div in coldfusion not in javascript ?

      thx
        • 1. Re: innerHTML
          Level 7
          What exactly do you need to do?

          --
          Bryan Ashcraft (remove brain to reply)
          Web Application Developer
          Wright Medical Technologies, Inc.
          =============================
          Macromedia Certified Dreamweaver Developer
          Adobe Community Expert (DW) :: http://www.adobe.com/communities/experts/


          "credev" <webforumsuser@macromedia.com> wrote in message
          news:e51348$nlc$1@forums.macromedia.com...
          > Hello,
          >
          > anyone has a function to put innerHTML for a div in coldfusion not in
          > javascript ?
          >
          > thx


          • 2. Re: innerHTML
            credev Level 1
            Hello Bryan,

            well i have a loaded xmlDoc (using cfxml) then i have 2 function which addsElement to that xmlDoc and another one is to transform it to HTML.

            so i have a drop list and onchange i need to add to xmlDoc using addElement() then transform and put the htmlCode in a layer.

            so i might have many times doing transformation and i dont want to append htmlCode anywhere i just want to replace it in that layer.

            i tried to do the following

            function refreshDescente()
            {
            var htmlCode = '';
            var DescenteDiv = document.getElementById("logDiv");
            DescenteDiv.innerHTML = "<cfoutput>#transformXML()#</cfoutput>";
            }


            where #transformXML()# is the transformation function
            <cffunction name="transformXML" returnType="string">

            <!--- You also need to work with your XSLT Stylesheet code --->
            <CFSET MyStylesheet = ExpandPath("logistique/logistique.xsl")>
            <!--- Read XSLT file into string variable called MyXsltCode --->
            <CFFILE ACTION="READ" FILE="#MyStylesheet#" VARIABLE="MyXsltCode">
            <!--- Perform the XSLT Stylesheet transformation --->
            <CFSET TransformedXmlCode = XmlTransform(xmlDoc, MyXsltCode)>
            <!--- Return transformed XML to whatever program asked for it --->
            <cfreturn TransformedXmlCode>

            </cffunction>


            but that javascript is giving me errors all the time.

            what do you suggest i should do.

            thank you alot
            • 3. Re: innerHTML
              Dan Bracuk Level 5
              quote:

              Originally posted by: credev
              Hello Bryan,
              <SNIP>
              so i have a drop list and onchange i need to add to xmlDoc using addElement() then transform and put the htmlCode in a layer.
              so i might have many times doing transformation and i dont want to append htmlCode anywhere i just want to replace it in that layer.
              <snip>
              but that javascript is giving me errors all the time.

              what do you suggest i should do.
              thank you alot

              Debug your javascript to get it working. You are trying to get things to happen on the client, not on the server so cold fusion isn't your answer.