Kobz46
asked on
How does jQuery.get work when it comes to dynamic data?
Hi!
I'm using the .get method to do a "hidden" submit, but battling to use dynamic data with it.
below is the code i've currently got which is working 100%, but as you can see, i want the { search:"gau" } to be able to be anything, ex { search: "john" } or { value: "help"} etc...
How can i do this?
I'm using the .get method to do a "hidden" submit, but battling to use dynamic data with it.
below is the code i've currently got which is working 100%, but as you can see, i want the { search:"gau" } to be able to be anything, ex { search: "john" } or { value: "help"} etc...
How can i do this?
function loadContent(page2load, data){
// data should be dynamic
if (page2load)
{
$.get(page2load, { search:"gau" }, function(result){
document.getElementById("div").innerHTML = result;
});
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Brilliance thanks a lot!!
K
K
Open in new window