Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • madhav shevde 3 posts 23 karma points
    Oct 15, 2009 @ 14:37
    madhav shevde
    0

    Processing results of a macro (to encode the xml using Server.htmlEncode.

    HI

    I want to processs the results ot the macro, i want to encode the xml using Server.htmlEncode function so that i can pass it to javascirpt

    <script type="text/javascript">
      // <![CDATA[
      var so = new SWFObject("swf/menu.swf", "menu", "850", "120", "8", "#FFFFFF");
      so.addParam("wmode","transparent");
      so.addVariable("xmldata","xml");
      so.write("navigationSWF");
      // ]]>
     </script>

    I want to pass the encoded xml to so.addVariable("xmldata","xmlresult") which is in the master template. How can i encode the results of the xml?

    Thanks and Regards

    Madhav

  • madhav shevde 3 posts 23 karma points
    Oct 15, 2009 @ 14:38
    madhav shevde
    0

    I mean how can encode the results of the macro?

  • Richard 146 posts 168 karma points
    Oct 15, 2009 @ 14:56
    Richard
    0

    You can call C# functions from a macro, and so call Server.Encode:

    http://umbraco.org/documentation/books/extending-xslt-with-c-sharp-or-javascript/extending-using-c-sharp

    So I would put the javascript output into a macro, and then also create the encoded text in the same macro.

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies