SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Feb 2003
    Location
    eez
    Posts
    331
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Must <input type="submit ...> have a name attribute?

    Hi!

    Must <input type="submit ...> have a name attribute?

    Thanks

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As far as I know, the use of the name attribute in this case is to allow for multiple submit buttons. I'm not 100% positive on that though.

    So unless you need multiple submit buttons--actually, input elements with the type set to "submit" but you get the idea (for example if you have multiple forms on a page) you won't need it.

  3. #3
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, it doesn't. If you have multiple submit buttons in a form, you'll want to name them, though, in order to tell which button was used to submit the form. Just as Dan said.
    Birnam wood is come to Dunsinane

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, now you show up, Tommy . So this is what I get for holding the fort until the cavalry arrives?


Bookmarks

Posting Permissions

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