Passing dynamic values on page redirect -
i have gui various fields in user can enter data. have button. want pass values entered user on gui, , on button click, want pass values page can use them.
note: no form/no onsubmit/no form action, page redirect page using button.
based on markup:
<div id="x">some data</div> <div id="y">some more data</div>
jquery script retrieve data want:
$("my button/link/whatever").click(function(e) { e.preventdefault(); var data = { x: $("#x").text(), y: $("#y").text() }; var req = $.ajax({ url: "the page send data to", type: "post", data: data }); req.done(function(response) { // here once request complete }); });
or use second form.