I'm looking to reload part of a page when a form is submitted using GET method. The following JavaScript runs, though I am unsure of how to get the submitted URL from the form?
I would have thought var link = jQuery(this).attr('GET'); or somethign would return it, and have tried URL etc... no luck though. Any ideas?
jQuery('form').submit(function(e){
e.preventDefault();
var link = jQuery(this).attr('GET'); //Get the href attribute
alert(link);
history.pushState('data', '', link);
jQuery('#search_main_section').fadeTo(300,0.3,function(){
load(link + ' #search_main_section', function(){ jQuery("#loader").hide();
jQuery('#search_main_section').fadeTo(100,1, function(){});
});
});