[jQuery] javascript server response
I'm trying to build something like rails RJS templates but a little
different.
I get the following server response
------------------------
<!-- var=comment -->
varcontents goes here
<!-- endvar -->
<!-- var=blabla -->
contents goes here
<!-- endvar -->
<script type="text/javascript">
$('#comments').innerHTML = comment;
</script>
------------------------
The reason for the <!-- var --> thingies is that it's easier for the server
to do it this way, else i'd have to load another file or start echoing stuff
which gets messy.
Anyway so i need the content in between to be transformed into a js
variable, and then the <script> tag(s) should be executed, with access to
those variables.
Can anyone help me on how to do this?
Thanks
btw if it's easier to use something else as a delimiter instead of <!-- var=
.. -->, please suggest.
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/