jQuery/Javascript Submit multiple forms in Chrome

Discussion in 'jQuery' started by jeffrose, May 5, 2010.

  1. #1
    I'm hoping someone here can help.

    I'm trying to use a single submit button to submit 3 forms on a single page. 1 form I use and process, the other 2 are sent to other sites.

    Everything works great except in Google Chrome (and Safari) due to some restriction/bug in WebKit.

       <script type="text/javascript">
            $(document).ready(function() {
                $('#test1 input[type="submit"]').click( function(){
                    $('#chrome2').submit();
                    $('#mine3').submit();
                    return false;
                })
            })
        </script>
    Code (markup):
    This works perfectly fine in IE and FireFox, but in Chrome - as it sits, it will submit the first 2 forms only. Yes, I know the return false prevents anything else, I'm getting to that.

    With the return false in, it will submit the 2 forms. Removing return false only processes the form named Test1 and not the other 2.

    I've shown code for attaching to the click event hoping that I could sneak my submits in on that, then let Chrome carry through to the submit function, but that doesn't work either.

    Anybod have any thoughts? I've spent about 8 hours on Google and various other places looking for suggestions and found a bunch and implemented them but none of them work.:confused:
     
    jeffrose, May 5, 2010 IP