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 9 of 9
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    358
    Thanks
    2
    Thanked 0 Times in 0 Posts

    how to submit two forms at same time?

    dear,

    i have two forms: Form1 & Form2 in a same file(abc.asp), another page(xyz.asp) is to capture the value that pass from abc.asp

    <Form name=Form1 action="abc.asp">
    <Select size=1 name=test onchange="document.form1.submit()">
    <option value=1>1</option>
    <option value=2>2</option>
    </select>
    <input type=text name=Description>
    </Form>


    <Form name=Form2 action="xyz.asp">
    <input type=text name=password>

    <input type=submit name=OK value=ok>
    </Form>
    ---- Just an simply example ---

    WHen user select the drop down list the FORM1 will refresh and pas the value to Description text box. Then user need to key in the value of the Password into the text box. Then press OK button the value of FORM1 and FORM2 will pass to next page(xyz.asp)....
    Thanks.
    =====================================================
    From NinjaTurtle
    ++http://ohmygoh.blogspot.com|http://technology.ohmygoh.com++

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Cincinnati, OH
    Posts
    545
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If I understand your question I dont think you need 2 forms, just set your form action with js.
    <Select size=1 name=test onchange="document.form1.action='abc.asp';document.form1.submit()">

    Change the action in your submit button to 'xyz.asp' the same way as above.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    358
    Thanks
    2
    Thanked 0 Times in 0 Posts
    yes i need to, bcos i am using <Form enctype="multipart/form-data"> in one of my form. i cannot get both form value to the next asp page.
    Thanks.
    =====================================================
    From NinjaTurtle
    ++http://ohmygoh.blogspot.com|http://technology.ohmygoh.com++

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is a common problem with upload components in ASP, if I get the gist of your post.

    I'm not quite sure how to solve the problem with two forms (as I've read, it's a common problem) however you might be better off using a free upload component that solves this problem with one form such as one at http://www.dundas.com

    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Posts
    358
    Thanks
    2
    Thanked 0 Times in 0 Posts
    if pple can write the component, then there must be a way.
    the problem is my company not allow me to use other third party component... that's y i so headache!!!
    Thanks.
    =====================================================
    From NinjaTurtle
    ++http://ohmygoh.blogspot.com|http://technology.ohmygoh.com++

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Posts
    358
    Thanks
    2
    Thanked 0 Times in 0 Posts
    if pple can write the component, then there must be a way.
    the problem is my company not allow me to use other third party component... that's y i so headache!!!
    Thanks.
    =====================================================
    From NinjaTurtle
    ++http://ohmygoh.blogspot.com|http://technology.ohmygoh.com++

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    They won't even let you use a free one? We use that at work, and my company is really bad about that stuff!

    There IS a way, and I've seen a tutorial on it, but I don't have it handy, so you might want to do soem searches of google, etc... (not to mention a search of the ASP forum, I know that references have been posted before to this, but I can't find any offhand).
    Last edited by whammy; 01-15-2003 at 01:39 AM.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Posts
    358
    Thanks
    2
    Thanked 0 Times in 0 Posts
    bcos of some security problem so they dun allow use to use DLL...
    and i m not so strong in DLL so that i cant say anything....

    i do research 4 few weeks already but still cannt get. but i can alot of knowledge on that, i will try to write my own just stuck at some places... i think i will do a pretty "dumb" way... hihihiihii, pass all the value from form1 to form2.
    Thanks.
    =====================================================
    From NinjaTurtle
    ++http://ohmygoh.blogspot.com|http://technology.ohmygoh.com++

  • #9
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, if it works, it's not necesarily "dumb"...
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

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