I have a form with submit, it posts form data to a file called \[code\]invoice-detail.php\[/code\]. At the same instance I want to call a function to process few values. I have tried the same but \[code\]onClick\[/code\] is not working.Please check the code below, suggest me how to go about performing both the actions at the same instance.\[code\]<?php include 'db.php'; ?><html><head><title>INVOICE Header</title><SCRIPT language=JavaScript>function showda(){alert ("Show function !");}function showtin(str8){if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }xmlhttp.open("GET","invtin.php?q8=" + str8,true);xmlhttp.send();}function showcst(str10){if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }xmlhttp.open("GET","invcst.php?q10=" + str10,true);xmlhttp.send();}</script></head><body> <?phpecho "<form name='form1' method='post' target='mainFrame' action='invoice-detail.php'>";echo "<table width='829' height='100' border='0' align='center' cellpadding='0' cellspacing='2'>";echo "<tr>";echo "<td height='39' width='99' class='sty1'>Invoice No</td>";$res=mysql_query("select * from INVHDR_draft WHERE usr='$user'");$row = mysql_fetch_assoc($res);$tincst=mysql_query("SELECT TIN_No, CST_No, ECC_No FROM ACMAST where Ac_code='$cat'");$tincst2=mysql_fetch_assoc($tincst);echo "<td width='140'><input name='Inv_no' type='text' size='6' maxlength='6' value='http://stackoverflow.com/questions/14039935/$row[Invno]' onBlur=\"if (this.value =http://stackoverflow.com/questions/14039935/='' || this.value =http://stackoverflow.com/questions/14039935/= 0) {alert('Invoice No. is required'); f1.Inv_no.focus();}\" onchange=\"showinvno(this.value);\"></td>";echo "</tr>";echo "<tr>";echo "<td height='39' width='99' class='sty1' valign='bottom'>TIN</td>";echo "<td width='140' valign='bottom'><input name='tin' type='text' size='15' maxlength='15' value='http://stackoverflow.com/questions/14039935/$tincst2[TIN_No]' onchange=\"showtin(this.value);\"></td>";echo "<td width='203' class='sty1' valign='bottom'>CST ";echo " <input name='cst' type='text' size='15' maxlength='15' value='http://stackoverflow.com/questions/14039935/$tincst2[CST_No]' onchange=\"showcst(this.value);\"></td>";echo "<td width='150' class='sty1' valign='bottom'>ECC No. ";echo " <input name='ecc' type='text' size='15' maxlength='15' value='http://stackoverflow.com/questions/14039935/$tincst2[ECC_No]' onchange=\"showcst(this.value);\"></td>";echo "</tr>";echo "</table>";echo " <input type='submit' name='Submit' value='http://stackoverflow.com/questions/14039935/Process!' onClick=\"'showda();\">";echo "</form>";?></body></html>\[/code\]