How can you post params to a page and call the target page without a form in html.
I have a link like this
<a href="#" class="post">Post</a>
and want post some information with jQuery
$('a.post').on('click', function() {
$.ajax({
'url' : 'test.php',
'type' : 'POST',
'data' : {}
});
});
This solution is working and i can post data but i cant goto the target page (‘test.php’). I want goto test.php and POST the data.
Why couldn’t you use the anchor to navigate in this situation? It seems to achieve your stated goal.
Or if you really need to perform a post, use a form: