SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: input types

  1. #1
    SitePoint Evangelist dhtmlhelp's Avatar
    Join Date
    May 2003
    Posts
    575
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    input types

    Hi,

    can I use an <input type='button'> as a submit button? I am not 100% sure but I think I would need to use <input type='submit'>. I have however many submit buttons in a page, and IE seems to highlight the first it encounters in the page. Is there a way of removing this highlight, or can I use another type attribute instead of submit?

    DH

  2. #2
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use a JavaScript submit script to use an input type of button as a Submit button.

    You can also use JavaScript to focus a specific button. In your body tag:

    Code:
    onLoad="document.formname.buttonname.focus();"

  3. #3
    SitePoint Evangelist dhtmlhelp's Avatar
    Join Date
    May 2003
    Posts
    575
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi greg,

    thanks but no javascript please. Thanks for the suggestion though.

    DH

  4. #4
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Out of curiosity... why no JavaScript?

  5. #5
    SitePoint Evangelist dhtmlhelp's Avatar
    Join Date
    May 2003
    Posts
    575
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My bad, I should have structured the <form> </form> properly. Javascript seemed an interesting solution, I got mixed up with accessibility and <noscript>, thanks though

    DH


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
  •