I want to be able to return an XML document from my server that contains
more than just Taconite commands, and I want to be able to read those
additional XML nodes from within a Taconite eval block.  I've come up with a
solution, but I wonder if there's a better way of doing this.  Here's a
trivial example of my solution:

*Client Code*
...
<script>
*var oxml;*
$.post('ajaxresponder.cfm',{
                action: 'dosomething',
                dataType: 'xml'
            },function (xml) { *oxml=xml;* });
</script>

*Server Return*
<xml>
   <status>0</status>
   <name>Brian</name>
   ...
   <taconite>
        <append select="#content">
               Some stuff to add
        </append>
        ...
        <eval><![CDATA[
              if($('#status'*,oxml*).val() == 0) {
                      $('#content").append( $('#name',*oxml*).val() );
              }
         ]]></eval>
     </taconite>
</xml>

Is there a way of accessing the current XML document from within a Taconite
eval block without using a global variable, i.e., omitting the parts in blue
above?

Thanks,
Brian

Reply via email to