Apparently, I don't have any form to submit and I don't want it to appear on the URL, either.
Here's one simple solution:
var form = $("<form action='" + url + '' method='post'>" +
" <input type='hidden' name='id' id='id' value='" + id + "'/>" +
" <input type='hidden' name='username' id='username' value='" + username + "'/>" +
"</form>");
$('body').append(form);
form.submit();
where
id and username are variables holding the data you want to send to another page, and url is the page you want to pass the data to.Any other alternate solution?
Please feel free to leave your message on the comments section.
No comments:
Post a Comment