JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css">
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
<form action="call.php" method="POST" id="form1" name="form1">
<input type="text" name="campname" id="campname">
<textarea id="longdesc" name="longdesc"></textarea>
<input type="text" name="vercode" id="vercode" >
<input type="submit" value="hii" id="submit_btn" >
</form>
JavaScript
$(document).ready(function () {
$('#submit_btn').click(function (e) {
e.preventDefault();
$(".ui-btn-text").text('Processing ...');
$.ajax({
cache: false,
type: "POST",
dataType: "json",
data: $('#form1').serialize(),
url: "echo/json",
complete: function (HttpRequest, textStatus) {
$(".ui-btn-text").text('Create');
}
});
return false;
});
});