Results 1 to 3 of 3

Thread: submit Two html forms with one javascript onclick event with Chrome

Hybrid View

  1. #1
    Join Date
    Apr 2011

    submit Two html forms with one javascript onclick event with Chrome

    I have a web page with two forms, when I click the button on one of the forms, the onclick event goes to a javascript that emails the first form and then the second form. This is correct, this is the way I want this to work. It's simple, it's easy, it works!
    However, it only works in FireFox and Internet Explorer, it will not work in Google Chrome browser.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      <meta http-equiv="content-type" content="text/html; charset=windows-1250">
    <form id="NameForm" method="post" action="mailto:yourFirstemail@email.com">
    Name: <input type="text" size="10" name="name"> <br />
    <input onclick=functionCaller() type="button" value="Submit Two Forms"> 
    <form id="AddressForm" name="DComments" method="post" action="mailto:yourSecondemail@email.com">
    Address: <input type="text" size="10" name="address"> <br />
    <script type="text/javascript">
    function functionCaller()

  2. #2
    Join Date
    Aug 2009
    The first thing I notice is the call to the javascript function (the value for onclick) isn't even quoted...

    Modern browsers seem to be a lot less forgiving to quirky markup, so I'd suggest trying that... if all else fails validate the document to see what else is wrong.

    Hope this helps!

  3. #3
    Join Date
    Apr 2011

    still not working

    thanks, for noticing, I changed the line below but it still works fine in IE and FF but not Chrome. I will validate (again) and fix any other errors.

    <input type="button" onclick="functionCaller()" value="Submit Two Forms">

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles