I am trying to submit a variable on form1 using jquery which at the end disables the submit button for this form with a message "Sent Successfully".
There's another form on the page called form2 which is assigned an action to submit variables to another page without ajax call but i think my button disable code is conflicting with the form2 not making it able to send the variables to the assigned action page.
<script language="javascript">
/**
* Disable submit button
*/
$(function(){
$('input:submit', '#form1').click(function(){
$(this).val('Sent Successfully...');
$(this).attr('disabled', 'disabled');
});
});
</script>
form2
<form id="form2" name="form2" method="post" action="search.php">
<label for="textfield"></label>
<input type="text" name="textfield" id="textfield" />
<input type="submit" name="button2" id="button2" value="Submit" />
</form>