Solved

AJAX/ASP

Posted on 2006-10-31
5
253 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…

914 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

22 Experts available now in Live!

Get 1:1 Help Now