Results 1 to 5 of 5

Thread: is it possible

  1. #1
    Join Date
    Oct 2006
    Posts
    92
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default is it possible

    Is it possible to use the submit button as a download button for an application or a .pdf file

  2. #2
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    maybe if you use a href attribute or wrap the button in an anchor.
    that is, if the href attribute/a tag is valid in forms.

    what have you tried so far?
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Certainly. A submit button can be used just like a link (although this can be semantically inadvisable):
    Code:
    <form action="file.tar.bz2">
      <input type="submit" value="Download">
    </form>
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Oct 2006
    Posts
    92
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    nothing so far i am building the page and the button looks cool when i apply a css tag to it so i was wondering if i could use the button for a download thini

  5. #5
    Join Date
    Oct 2006
    Posts
    92
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey View Post
    Certainly. A submit button can be used just like a link (although this can be semantically inadvisable):
    Code:
    <form action="file.tar.bz2">
      <input type="submit" value="Download">
    </form>
    thanks for the code I owe you big time

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
  •