Any problem with this codes?The button not working at all if i put few actions inside the function,if i just put one (document.) action inside the function,it works.

<script type="text/javascript">   function fnSubmit (){


     var form1Content = document.getElementById("form1").innerHTML;


     var form2Content = document.getElementById("form3").innerHTML;


     document.getElementById("toSubmit").innerHTML=form1Content+form2Content;


                 document.forms.toSubmit.submit();


  }

    </script>

<input type="submit" name="submit" value="Insert" onclick="fnSubmit()"/>

i see where you make reference to the ids "form1" and "form2" but in your code you have not used it outside of your javascript code

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.