Response title
This is preview!
<form id="payproc" action="http://www.paypal.com/webscr" enctype="multiform/data">
<input type="hidden" name="price" value="10.00">
<input type="submit" id="submit" name="submit" value="Send">
</form>
<form id="payproc" action="http://secure.authorize.net/trans/" enctype="multiform/data">
<input type="hidden" name="cost" value="10.00">
<input type="submit" id="submit" name="submit" value="Send">
</form>
$('#payproc').load('index.php?action=updatePay&shipping=creditcard');
$.ajax({
url: 'ajax_balance.php?tz=' + tz_arg + '&from=' + from_t + '&to=' + to_t,
type: 'GET',
dataType: 'json',
timeout: 5000,
error: function (xhr, status) {
// oh, error! A message is in 'status'
},
success: function (json) {
// things to do with 'json'. it's been parsed already
}
});
$.ajax({
url: 'post.php',
type: 'POST',
data: 'id=' + id + '&data' + encodeURIComponent(data),
timeout: 5000,
beforeSend: function () {
// things to do before starting the request,
// for example display "Please wait..." somewhere
},
error: function (xhr, status) {
// oh, error! A message is in 'status'
},
success: function (html) {
// things to do with 'html', which is still a string here
},
complete: function () {
// called after the request, no matter if it was successful
// or not. called after error/success above.
// you could remove the "please wait..." here.
}
});
<form id="pay" action="http://www.paypal.com/webscr" enctype="multiform/data">
<input type="hidden" name="price" value="10.00">
<input type="submit" id="submit" name="submit" value="Send">
</form>
<script type="text/javascript"><!--
function getForm() {
$.ajax({
type: 'GET',
url: 'test.php?action=UpdatePayForm&paytype=1',
async: false,
success: function(data) {
$("form#pay").attr("action", function (arr) {
return arr;
})
}
});
//--></script>
© 2013 jQuery Foundation
Sponsored by and others.