• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

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
0
arvanhalleorg
Asked:
arvanhalleorg
  • 2
  • 2
2 Solutions
 
b0lsc0ttCommented:
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
 
BrianGEFF719Commented:
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
 
b0lsc0ttCommented:
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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now