Hey,
Below is a function that takes a click of a button from a form and is supposed to load up the values and append them to a PHP
page where I can use the values to load JSON data. I have a variable to serialize the data
var formData = $('form').serialize();
The problem is, I need to append formData's output as a querystring into the results.php url below. I cannot seem to do this. How does one accomplish this?
Thanks. Below is the failed code that can spit out the data but I cannot append it to the results.php url:
Code: Select all
$('#my_button').click(function () {
var formData = $('form').serialize();
alert(formData);
[b]loadJSON("http://www.mysite.com/results.php?id=1&data=' + formData' ");[/b]
});