Results 1 to 6 of 6

Thread: hyperlinking a button

  1. #1
    Join Date
    Dec 2005
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default hyperlinking a button

    Once I create a button using this code:
    <input type="button" value="Click Here To Log In">
    How do I hyperlink this button to a page on my site that is in the same frame as this one? Thanks

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

    Default

    Easiest way:
    Code:
    <form action="login.html" method="get">
      <input type="submit" value="Click here to log in">
    </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!

  3. #3
    Join Date
    Dec 2005
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default It doesn't work

    The code you left doesn't work when it is in a frame.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by techsol
    The code you left doesn't work when it is in a frame.
    This probably would work then, using target:

    Code:
    <form action="login.html" method="get" target="frameName">
      <input type="submit" value="Click here to log in">
    </form>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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

    Default

    Yes, but I was given to understand you wanted the target to be the current frame.
    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!

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Yeah... the default is the current frame. If you want another frame, use the added line in red above. If not, you're set without that.

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
  •