Menu

Catch response in a variable

Help
2007-01-06
2013-04-02
  • Thierry Collogne

    Hi all,

    I am interested in using Clean Ajax, but I have a question. I have a xml file containing a list of tips.
    Every time a user enters a page, a random tip needs to be rendered.

    It should also be possible to press a button "next" to display the next tip in the xml file.

    I have written my own Ajax code, but I am thinking of using Clean Ajax because I could use the xslt functionality in some other place in my site.

    In my code I parse the xml file using the javascript dom parser. I put each tip in an array. That way I can easily do a random tip and display the next tip.

    When I look at the Clean Ajax examples, it seems that the response from doGet of doPost is always written to a html component which is
    declared by consumer parameter.

    My question is now : is it possible to catch the response in a javascript variable instead of write it to a html component?

    I hope my question is a bit clear, otherwise let me know and I will try to explain in another way.

    Thierry

     
    • Carlos Eduardo Goncalves

      Take a look again in the section Demos on the Clean website. You will find a demo called Message Events.
      See the code presented by the links and you will see that it is possible to apply responses on variables.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.