Solved

AJAX/ASP

Posted on 2006-10-31
5
252 Views
Last Modified: 2009-07-29
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
Comment
Question by:arvanhalleorg
  • 2
  • 2
5 Comments
 
LVL 54

Accepted Solution

by:
b0lsc0tt earned 300 total points
ID: 17846103
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
 
LVL 19

Assisted Solution

by:BrianGEFF719
BrianGEFF719 earned 200 total points
ID: 17847259
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
 
LVL 2

Author Comment

by:arvanhalleorg
ID: 17849237
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
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 17850795
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
 
LVL 2

Author Comment

by:arvanhalleorg
ID: 17859252
I ended up shoving the main data into a cookie and read it with asp. :)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now