Accessing A Variable From Inside A Jquery Drop Down List
I have a jQuery dropdown list that has two dropdowns. The first one is a list of cars and the second one shows the car's models. This is all working fine. Now I would like to use t
Solution 1:
you can use ajax for this to send your variable to another page and get response from there .something like this
var id = $('selector').val();
varAjaxURL = 'http://example.com';
var data = id;
$.ajax({
type: "POST",
url: AjaxURL,
data: {data: data},
success: function(result) {
window.console.log('Successful');
}
});
Solution 2:
I had to put all the select inside form tags, use a different page for the search and add the function to the bottom of the search page instead of accessing it from a different page.
Thank you to anyone who posted answers and tried to help me with this. It's working (with a few bugs) but I'm so happy it's finally working.
Post a Comment for "Accessing A Variable From Inside A Jquery Drop Down List"