AJAX/ASP

I have a code (Ajax/Javascript) that sends the data over to an asp page to work with the values. However, I'd like the asp page to read the form elements of my choice  so that I can send those values over to the database and show the end result on the screen itself. The entire code is in the background running with an XMLHttp object. Any help would be appreciated.

Audrey-Rose
LVL 2
arvanhalleorgAsked:
Who is Participating?
 
b0lsc0ttConnect With a Mentor IT ManagerCommented:
arvanhalleorg,

You will need to use Javascript to put the form values in the querystring that is used by the XMLHttp object.  The form isn't sent to the page during this process so there is no way for the server side script to access.  The server script can read the querystring, which is part of the URL, with Request.Querystring("name").

I hope this helps but let me know if you need a specific example.  If you provide details then I can use that info to make the example.  Let me know if you have any questions or need more information.

b0lsc0tt
0
 
BrianGEFF719Connect With a Mentor Commented:
arvanhalleorg ,

As bolsc0tt has already pointed out, you have to decide ahead of time what the server is going to get, if the server _may_ need something, then just past it along in a get request using ajax and it can ignore it if it doesnt need it.

If you would like I can provide code that build as an AJAX get request using the value of every form element for you.


-Brian
0
 
arvanhalleorgAuthor Commented:
I was hoping there was an alternative way, but I guess I'll have to go with making the function that retrieves the data for me. Thanks :)
0
 
b0lsc0ttIT ManagerCommented:
Your welcome!  I'm sorry the answer wasn't maybe what you wanted to hear but I'm glad that I could be one of those that helped.  Thank you for the grade, the points and the fun question.

bol
0
 
arvanhalleorgAuthor Commented:
I ended up shoving the main data into a cookie and read it with asp. :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.