I want to call a button submit when page is loading.
I code as:
(function($) {
//Id of form: searchform
document.searchform.submit();
})(jQuery);
But Page request auto multy time. I want only auto submit one time when load page.
Can you help me? thanks.
If you need to submit it only once to the same page, you should add some kind of variable, that you check like this:
This will submit only once, since the 2nd time there will be a post value.
Hope that helps.