Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Mar 2002
    Location
    Alabama sans the damn flag
    Posts
    263
    Member #
    38
    I've several buttons on a page, all of the submit, all of them submitting different things.

    How do I know which button was actually hit? I'm assuming that there is a property somewhere that says "it's ME". That might not be the case, at least, I haven't been able to find it.
    DerFarm
    I talk to squirrels.
    Squirrels Answer.

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    IIRC it works by giving each button the same name but unique values and reading the value of the variable of the button's name, or giving them all different names and seeing which of the variables resulting from the form submission contains a value. The first one (if it works) is cleaner IMO.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Senior Member
    Join Date
    Mar 2002
    Location
    Alabama sans the damn flag
    Posts
    263
    Member #
    38
    ah, so If I have buttons 1,2,3 and call them all ME, then the passed value of ME will be the number of the button that was clicked. Hmmmmm....
    DerFarm
    I talk to squirrels.
    Squirrels Answer.

  5. #4
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Theoretically. I think that's how vB does it (ex: distinguishing between preview post and submit post when the newreply form is submitted).
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:58 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com