Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2009
    Thanked 0 Times in 0 Posts

    Exclamation AJAX responseText ... HELP!

    Dear Forum Guys,
    I have a problem regarding how to recieve multiple response texts from an Ajax code.

    That is: I want to recieve multiple "responseText"s from the ajax code so that i can populate my form in an asp page. I would also like to know how i can send multiple asp or javascipt Variables inside the responseText of an Ajax code, so that when ajax does responseText i could use the variables just sent from another page (i.e the variables are recieved by the same ajax code after doing responseText) to do some specific tasks.

    Thank you.

  2. #2
    Regular Coder
    Join Date
    Jan 2006
    Thanked 84 Times in 84 Posts
    You only ever get one responseText per AJAX call, but you could modify the server side script to provide you with a set of variables joined by a certain character ('/' for example).

    Then perform ajax.responseText.split("/") to convert it to an array. Another option is to eval() the responseText, and have the output of the serverside script be whatever javascript you want.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts