Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
10-01-2008, 03:48 PM #1
- Join Date
- Oct 2008
- Thanked 0 Times in 0 Posts
Accessing form fields in PHP via ajax
I have a page where I collect information in fields, radio buttons, checkboxes, etc. As the use changes the values in the form, the contents of the page are updated dynamically... things are working pretty well so far.
var full_url = url + query;
var request = createXMLHttpRequest();
request.open("GET", full_url, true);
is becoming tedious... the query can get pretty long.
Is there a simple way for my php pages to access the form values? I naively changed the request.open from GET to POST but that did not seem to work...
I'm sure that this has been asked before... Can someone point me to a link?
10-01-2008, 04:26 PM #2
if you're ok with using a framework, prototype has some awesome tools
^ that will take the form of your choice and turn it into a string for your ajax request. prototype has a lot of other toys for handling these things too.