Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Submiting two forms with one button

    Is there a way to submit the data in two forms when the submit button is hit in one form? Example: the info in form a is always submited when the submit button in form b or c is pressed.

    Thanks

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <form name="a">
    ...
    </form>

    <form name="b">
    ...
    <input type="submit" onclick="document.forms['a'].submit();return true;">
    ...
    </form>

    This should do it.

  • #3
    New to the CF scene
    Join Date
    Dec 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    didn't work

    I tried the code, but when I tested it, it was still only sending me the info from the form which contained the submit button. Any idea what I could have done wrong or what I might have misconfiged.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    To help you further I would need to see at least the relevant parts of your code.


  •  

    Posting Permissions

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