SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    Can we go to a 48 hour day?
    Join Date
    May 2002
    Location
    MI
    Posts
    906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    problem with Form Method="Link"

    I am trying to use
    Code:
      <FORM METHOD="LINK" ACTION="viewSponsor.php?ID=115">
      			  <INPUT TYPE="submit" VALUE="test">
      </FORM>
    Now when I actually hit this button on this the querystring on the called page is dead after the ?. Is there something I am missin here? I am trying to use form buttons for link to functions in an application I am working on.
    mitechie.com
    "Techies just think a little differently
    ...at least that is what they keep telling me."

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I'm pretty sure that "link" isn't a proper value for the form's method:
    http://www.w3.org/TR/REC-html40/inte...ms.html#h-17.3

  3. #3
    Can we go to a 48 hour day?
    Join Date
    May 2002
    Location
    MI
    Posts
    906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I had not seen it before, but found it here:
    http://www.htmlgoodies.com/tutors/formbutt.html

    during a search for how best to use form buttons as links to other pages.
    mitechie.com
    "Techies just think a little differently
    ...at least that is what they keep telling me."

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by deuce868
    during a search for how best to use form buttons as links to other pages.
    You shouldn't. You can use the <a> tag and some clever CSS though:
    Code:
    a.button, a.button:hover, a.button:visited {
      border: 3px outset #c0c0c0;
      color: black;
      background-color: #c0c0c0;
      padding: 3px;
      text-decoration: none;
    }
    a.button:active {
      border: 3px inset #c0c0c0;
    }
    HTML Code:
    <a class="button" href="http://www.cnn.com/">CNN</a>

  5. #5
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alternatively, try this:
    HTML Code:
    <form method="GET" action="viewSponsor.php">
     <input type="hidden" name="ID" value="115">
     <input type="submit" value="test">
     </form>
    Be aware that some more security concious browsers may inform the user that they're sending data back to the server when they hit the button...


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
  •