Hi I use ajax to submit my forms. it's working fine But the problem is when I disable the submit button onclick, the form is not submitted in IE I have made 2 simple forms in 1 html page. if you check that page, ajax submit works on one of them but doesn't work on the one I disable submit field It's ok in firefox, both form works in firefox. The problem is in IE Here is the page: http://khojasteh.org/project/test/ And this is the source code for 2 forms: <head> <script src="http://khojasteh.org/project/test/ajaxsbmt.js" type="text/javascript"></script> <title>Ninja Looters </title> <link href="style/style.css" rel="stylesheet" type="text/css" /> <link rel="STYLESHEET" type="text/css" href="template_files/main.css"> </head> <table width=60% align=left> <tr> <td colspan=3> Ajax submit doesn't work here </td></tr> <br> <form name="form2" method="post" onsubmit="xmlhttpPost('ajaxphp.php', 'form2', 'char_result1', '<img src=\'images/pleasewait.gif\'>'); return false;"> <input type=hidden name="action" value="importcharacter"> <tr> <td> Name: </td><td colspan=2> <input type="text" name="name" size=30/> </td> </tr> <tr> <td> </td><td colspan=2> <input type="submit" name="Submitbtn" value="Submit" id="Submitbtn" onclick="Disablefield(Submitbtn)"> </td> </tr> <tr><td colspan=3> <div id="char_result1"></div> </form> <form name="form1" method="post" onsubmit="xmlhttpPost('ajaxphp.php', 'form1', 'char_result2', '<img src=\'images/pleasewait.gif\'>'); return false;"> <input type=hidden name="action" value="importcharacter"> <tr><td colspan=3> </td></tr> <tr> <td colspan=3> Ajax submit works here </td></tr> <tr> <td> Name: </td><td colspan=2> <input type="text" name="name" size=30/> </td> </tr> <tr> <td> </td><td colspan=2> <input type="submit" name="Submitbtn2" value="Submit" id="Submitbtn2" > </td> </tr> </form> <tr> <td colspan=3> <div id="char_result2"></div></td></tr> </table> HTML:
Change this script From : <form name="form2" method="post" onsubmit="xmlhttpPost('ajaxphp.php', 'form2', 'char_result1', '<img src=\'images/pleasewait.gif\'>'); return false;"> and <input type="submit" name="Submitbtn" value="Submit" id="Submitbtn" onclick="Disablefield(Submitbtn)"> HTML: To : <form name="form2" method="post" onsubmit="Disablefield(Submitbtn);xmlhttpPost('ajaxphp.php', 'form2', 'char_result1', '<img src=\'images/pleasewait.gif\'>'); return false;"> and <input type="submit" name="Submitbtn" value="Submit" id="Submitbtn"> HTML: