Using <form> as link

Discussion in 'HTML' started by Jim Scott, Mar 27, 2005.

  1. Jim Scott

    Jim Scott Guest

    I have successfully work out how to use a 'form' button as a link. I was
    quite pleased as it is only two lines and works well.
    EXCEPT when the URL is a long complicated string such as a multimap
    address. Then I have to go back to a different method of using a 'form'
    which is not standards compliant.
    Both types appear on this page
    http://freespace.virgin.net/mr.jimscott/bells/Bell_Menu.html
    (the map ones are the ones that are not validatable, the others are ok)
    Any ideas?
    --
    Jim on Tyneside UK
    Remove X to email me.
    http://freespace.virgin.net/mr.jimscott/
     
    Jim Scott, Mar 27, 2005
    #1
    1. Advertising

  2. Jim Scott wrote:

    > I have successfully work out how to use a 'form' button as a link. I was
    > quite pleased as it is only two lines and works well.


    Its as many lines as you make it ...

    <form
    action="foo"
    method="get">
    <div>
    <input
    type="submit">
    </div>
    </form>

    Look! I can do it on 8! ;)

    Its very ugly though. Far better to use real link. You can then style it to
    look like a button, or better yet - not. Users expect buttons to do things.
    Users expect links to go to set places. Its not very nice to confuse them
    (lots of users are very easily confused).

    > EXCEPT when the URL is a long complicated string such as a multimap
    > address. Then I have to go back to a different method of using a 'form'
    > which is not standards compliant.


    No you don't.

    > Both types appear on this page
    > http://freespace.virgin.net/mr.jimscott/bells/Bell_Menu.html
    > (the map ones are the ones that are not validatable, the others are ok)
    > Any ideas?


    * Use real links
    * Don't depend on JavaScript
    * Read the FAQ about ampersands in URLs (the one that the validator links to
    in its error message about them!).

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Mar 27, 2005
    #2
    1. Advertising

  3. Jim Scott

    Jim Scott Guest

    On Sun, 27 Mar 2005 09:43:32 +0100, David Dorward wrote:

    > Jim Scott wrote:
    >
    >> I have successfully work out how to use a 'form' button as a link. I was
    >> quite pleased as it is only two lines and works well.

    >
    > Its as many lines as you make it ...
    >
    > <form
    > action="foo"
    > method="get">
    > <div>
    > <input
    > type="submit">
    > </div>
    > </form>
    >
    > Look! I can do it on 8! ;)
    >
    > Its very ugly though. Far better to use real link. You can then style it to
    > look like a button, or better yet - not. Users expect buttons to do things.
    > Users expect links to go to set places. Its not very nice to confuse them
    > (lots of users are very easily confused).
    >
    >> EXCEPT when the URL is a long complicated string such as a multimap
    >> address. Then I have to go back to a different method of using a 'form'
    >> which is not standards compliant.

    >
    > No you don't.
    >
    >> Both types appear on this page
    >> http://freespace.virgin.net/mr.jimscott/bells/Bell_Menu.html
    >> (the map ones are the ones that are not validatable, the others are ok)
    >> Any ideas?

    >
    > * Use real links
    > * Don't depend on JavaScript
    > * Read the FAQ about ampersands in URLs (the one that the validator links to
    > in its error message about them!).


    Thank you.
    I found your reply sarcastic and patronising in the extreme and as a
    relative newbie I found most of what you said beyond comprehension. I have
    a degree in physics and in maths, but came to html late in life.
    I presume by 'real link' that you mean a line of text which redirects the
    user to the page in question.
    I wish to use a labelled button that appears to move, and the 'form' method
    I stumbled upon avoids me making lots of 'up' and 'down' buttons for this
    purpose.
    --
    Jim on Tyneside UK
    Remove X to email me.
    http://freespace.virgin.net/mr.jimscott/
     
    Jim Scott, Mar 27, 2005
    #3
  4. Jim Scott

    Toby Inkster Guest

    Jim Scott wrote:

    > EXCEPT when the URL is a long complicated string such as a multimap
    > address. Then I have to go back to a different method of using a 'form'
    > which is not standards compliant.


    You are using (hastily line wrapped):

    <form><input style="width: 100px;" name="area map"
    value="AREA MAP"
    onclick="window.location='http://www.multimap.com/map/browse.cgi?
    client=public&X=435000&Y=567500&width=500&height=300&gride=435393
    &gridn=568683&srec=0&coordsys=gb&db=pc&addr1=&addr2=&addr3=&pc=
    NE290LW&advanced=&local=&localinfosel=&kw=&inmap=&table=&ovtype=
    &zm=0&scale=50000&out.x=4&out.y=8'"
    type="button"><br>
    </form>

    Try:

    <form action="http://www.multimap.com/map/browse.cgi" method="get">
    <div>
    <input type="hidden" name="client" value="public">
    <input type="hidden" name="X" value="435000">
    <input type="hidden" name="Y" value="567500">
    <input type="hidden" name="width" value="500">
    <input type="hidden" name="height" value="300">
    <input type="hidden" name="gride" value="453393">
    <input type="hidden" name="gridn" value="568683">
    <input type="hidden" name="srec" value="0">
    <input type="hidden" name="coordsys" value="gb">
    <input type="hidden" name="db" value="pc">
    <input type="hidden" name="pc" value="NE290LW">
    <input type="hidden" name="zm" value="0">
    <input type="hidden" name="scale" value="50000">
    <input type="hidden" name="out.x" value="4">
    <input type="hidden" name="out.y" value="8">
    <input type="submit" value="AREA MAP">
    </div>
    </form>

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Mar 27, 2005
    #4
  5. Jim Scott

    Jim Scott Guest

    On Sun, 27 Mar 2005 11:41:04 +0100, Toby Inkster wrote:

    > Jim Scott wrote:
    >
    >> EXCEPT when the URL is a long complicated string such as a multimap
    >> address. Then I have to go back to a different method of using a 'form'
    >> which is not standards compliant.

    >
    > You are using (hastily line wrapped):
    >
    > <form><input style="width: 100px;" name="area map"
    > value="AREA MAP"
    > onclick="window.location='http://www.multimap.com/map/browse.cgi?
    > client=public&X=435000&Y=567500&width=500&height=300&gride=435393
    > &gridn=568683&srec=0&coordsys=gb&db=pc&addr1=&addr2=&addr3=&pc=
    > NE290LW&advanced=&local=&localinfosel=&kw=&inmap=&table=&ovtype=
    > &zm=0&scale=50000&out.x=4&out.y=8'"
    > type="button"><br>
    > </form>
    >
    > Try:
    >
    > <form action="http://www.multimap.com/map/browse.cgi" method="get">
    > <div>
    > <input type="hidden" name="client" value="public">
    > <input type="hidden" name="X" value="435000">
    > <input type="hidden" name="Y" value="567500">
    > <input type="hidden" name="width" value="500">
    > <input type="hidden" name="height" value="300">
    > <input type="hidden" name="gride" value="453393">
    > <input type="hidden" name="gridn" value="568683">
    > <input type="hidden" name="srec" value="0">
    > <input type="hidden" name="coordsys" value="gb">
    > <input type="hidden" name="db" value="pc">
    > <input type="hidden" name="pc" value="NE290LW">
    > <input type="hidden" name="zm" value="0">
    > <input type="hidden" name="scale" value="50000">
    > <input type="hidden" name="out.x" value="4">
    > <input type="hidden" name="out.y" value="8">
    > <input type="submit" value="AREA MAP">
    > </div>
    > </form>


    Thanks Toby.
    --
    Jim on Tyneside UK
    Remove X to email me.
    http://freespace.virgin.net/mr.jimscott/
     
    Jim Scott, Mar 27, 2005
    #5
  6. Jim Scott wrote:
    > I have successfully work out how to use a 'form' button as a link. I was
    > quite pleased as it is only two lines and works well.
    > EXCEPT when the URL is a long complicated string such as a multimap
    > address. Then I have to go back to a different method of using a 'form'
    > which is not standards compliant.
    > Both types appear on this page
    > http://freespace.virgin.net/mr.jimscott/bells/Bell_Menu.html
    > (the map ones are the ones that are not validatable, the others are ok)
    > Any ideas?


    Man, Multi map really blows doesn't it? I mean their website not the
    link crap.

    Now for your issue, why not just use a link?

    --
    -=tn=-
     
    Travis Newbury, Mar 27, 2005
    #6
  7. Jim Scott wrote:
    >>* Use real links
    >>* Don't depend on JavaScript
    >>* Read the FAQ about ampersands in URLs (the one that the validator links to
    >>in its error message about them!).

    > Thank you.
    > I found your reply sarcastic and patronising in the extreme and as a
    > relative newbie I found most of what you said beyond comprehension. I have
    > a degree in physics and in maths, but came to html late in life.


    Which is why you need to do What David suggested. He has been doing
    this for a long long time.

    > I presume by 'real link' that you mean a line of text which redirects the
    > user to the page in question.


    Yes that is what he probably means.

    > I wish to use a labelled button that appears to move, and the 'form' method
    > I stumbled upon avoids me making lots of 'up' and 'down' buttons for this
    > purpose.


    Huh? Use a link. you will be happier, as will your visitors

    --
    -=tn=-
     
    Travis Newbury, Mar 27, 2005
    #7
  8. Jim Scott

    Toby Inkster Guest

    Toby Inkster, Mar 27, 2005
    #8
  9. Jim Scott

    ...D. Guest

    Jim Scott <> wrote:
    >Thank you.
    >I found your reply sarcastic and patronising in the extreme and as a
    >relative newbie I found most of what you said beyond comprehension. I have
    >a degree in physics and in maths, but came to html late in life.
    >I presume by 'real link' that you mean a line of text which redirects the
    >user to the page in question.
    >I wish to use a labelled button that appears to move, and the 'form' method
    >I stumbled upon avoids me making lots of 'up' and 'down' buttons for this
    >purpose.


    Jim.. it's just like that here in this HTML group.. There's like a "club"
    of several "pros".. In fact your lucky you got some costrutive critssm in
    the reply, not just a: come back when you know 1/2 of what we know, and
    maybe we'll help you without just pointing you at something with links..

    There re some good people here though, I'm not talking everybody. .

    ...D.
     
    ...D., Mar 27, 2005
    #9
  10. Jim Scott

    Jim Scott Guest

    On Sun, 27 Mar 2005 13:07:54 +0100, Toby Inkster wrote:

    > Jim Scott wrote:
    >
    >> I presume by 'real link' that you mean a line of text which redirects the
    >> user to the page in question.
    >> I wish to use a labelled button that appears to move

    >
    > That doesn't mean you can't use a real link...
    > http://examples.tobyinkster.co.uk/link-looks-like-a-button


    Ooh I like that.
    I wish I had found it before changed most of my web pages (lots and lots).
    What I want now is a means of adding the text/css to the headers on all my
    pages (lots and lots and lots) without opening them all individually :eek:)
    --
    Jim on Tyneside UK
    Remove X to email me.
    http://freespace.virgin.net/mr.jimscott/
     
    Jim Scott, Mar 27, 2005
    #10
  11. Jim Scott

    Jim Scott Guest

    On Sun, 27 Mar 2005 04:35:21 -0800, ...D. wrote:

    > Jim Scott <> wrote:
    >>Thank you.
    >>I found your reply sarcastic and patronising in the extreme and as a
    >>relative newbie I found most of what you said beyond comprehension. I have
    >>a degree in physics and in maths, but came to html late in life.
    >>I presume by 'real link' that you mean a line of text which redirects the
    >>user to the page in question.
    >>I wish to use a labelled button that appears to move, and the 'form' method
    >>I stumbled upon avoids me making lots of 'up' and 'down' buttons for this
    >>purpose.

    >
    > Jim.. it's just like that here in this HTML group.. There's like a "club"
    > of several "pros".. In fact your lucky you got some costrutive critssm in
    > the reply, not just a: come back when you know 1/2 of what we know, and
    > maybe we'll help you without just pointing you at something with links..
    >
    > There re some good people here though, I'm not talking everybody. .
    >
    > ...D.


    Thanks I am off to try Toby's button.
    --
    Jim on Tyneside UK
    Remove X to email me.
    http://freespace.virgin.net/mr.jimscott/
     
    Jim Scott, Mar 27, 2005
    #11
  12. Jim Scott

    Toby Inkster Guest

    Jim Scott wrote:

    > I wish I had found it before changed most of my web pages (lots and lots).
    > What I want now is a means of adding the text/css to the headers on all my
    > pages (lots and lots and lots) without opening them all individually :eek:)


    If you're using the same visual effect on a bunch of pages, use an
    external style sheet.

    Example: http://tobyinkster.co.uk/

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Mar 27, 2005
    #12
  13. Jim Scott

    Jim Scott Guest

    On Sun, 27 Mar 2005 16:32:43 +0100, Toby Inkster wrote:

    > Jim Scott wrote:
    >
    >> I wish I had found it before changed most of my web pages (lots and lots).
    >> What I want now is a means of adding the text/css to the headers on all my
    >> pages (lots and lots and lots) without opening them all individually :eek:)

    >
    > If you're using the same visual effect on a bunch of pages, use an
    > external style sheet.
    >
    > Example: http://tobyinkster.co.uk/


    Thanks Toby I'll bookmark that. I actually tried that and of course it
    works, but it would take me hours to go back and start again.
    In the meanwhile I like the look and feel of the <form> button (and if it's
    ugly html, the result looks pretty, which is what I'm after).
    The alternative method of getting over the ampersand problem also worked
    although you transposed two numbers and put my church in the North Sea :eek:)
    I converted the other one too.
    Right at the mo' WC3 is telling me I have a stray <input> error somewhere
    on that page so I'm off to look for it.
    Ta!
    --
    Jim on Tyneside UK
    Remove X to email me.
    http://freespace.virgin.net/mr.jimscott/
     
    Jim Scott, Mar 27, 2005
    #13
  14. D wrote:

    > Jim.. it's just like that here in this HTML group.. There's like a "club"
    > of several "pros".. In fact your lucky you got some costrutive critssm in


    Is critssm anything like floatsam and jetsam?

    --
    Blinky T. "is that a costrutive question?" Shark
     
    Blinky the Shark, Mar 27, 2005
    #14
  15. In article <>,
    says...
    > I have successfully work out how to use a 'form' button as a link.


    It's a form submission, not a link.

    --
    Hywel http://kibo.org.uk/
    I do not eat quiche.
     
    Hywel Jenkins, Mar 27, 2005
    #15
  16. Jim Scott

    Jim Scott Guest

    On Sun, 27 Mar 2005 19:48:10 +0100, Hywel Jenkins wrote:

    > In article <>,
    > says...
    >> I have successfully work out how to use a 'form' button as a link.

    >
    > It's a form submission, not a link.


    You must be one of the pro's then?
    --
    Jim on Tyneside UK
    Remove X to email me.
    http://freespace.virgin.net/mr.jimscott/
     
    Jim Scott, Mar 27, 2005
    #16
  17. Jim Scott

    DC Guest

    Blinky the Shark wrote:
    > D wrote:


    >> Jim.. it's just like that here in this HTML group.. There's like a "club"
    >> of several "pros".. In fact your lucky you got some costrutive critssm in


    > Is critssm anything like floatsam and jetsam?


    Is floatsam have anything to do with root beer? };O)

    --
    DC Linux RU #1000111011000111001

    Customize Xnews - http://dcicons.fateback.com
     
    DC, Mar 27, 2005
    #17
  18. [OT] Re: Using <form> as link

    DC wrote:

    > Blinky the Shark wrote:


    >> D wrote:


    >>> Jim.. it's just like that here in this HTML group.. There's like a "club"
    >>> of several "pros".. In fact your lucky you got some costrutive critssm in


    >> Is critssm anything like floatsam and jetsam?


    > Is floatsam have anything to do with root beer? };O)


    It's all jetsam if you're on a 737.

    --
    Blinky Linux Registered User 297263
    Who has implemented Usenet Solution #45933:
    Now killing all posts originating at Google Groups
     
    Blinky the Shark, Mar 27, 2005
    #18
  19. Jim Scott

    Jim Scott Guest

    On 27 Mar 2005 21:01:09 GMT, DC wrote:

    > Blinky the Shark wrote:
    >> D wrote:

    >
    >>> Jim.. it's just like that here in this HTML group.. There's like a "club"
    >>> of several "pros".. In fact your lucky you got some costrutive critssm in

    >
    >> Is critssm anything like floatsam and jetsam?

    >
    > Is floatsam have anything to do with root beer? };O)


    As an Englishman, can anyone explain what the **** root beer is?
    --
    Jim on Tyneside UK
    Remove X to email me.
    http://freespace.virgin.net/mr.jimscott/
     
    Jim Scott, Mar 27, 2005
    #19
  20. Jim Scott wrote:

    > On 27 Mar 2005 21:01:09 GMT, DC wrote:
    >
    >
    >> Blinky the Shark wrote:
    >>
    >>> D wrote:

    >>
    >>>> Jim.. it's just like that here in this HTML group.. There's
    >>>> like a "club" of several "pros".. In fact your lucky you got
    >>>> some costrutive critssm in

    >>
    >>> Is critssm anything like floatsam and jetsam?

    >>
    >> Is floatsam have anything to do with root beer? };O)


    No, it's Fat Sam's cousin. <g>

    > As an Englishman, can anyone explain what the **** root beer is?


    As an American, I can point you to: :)
    <URL:http://www.google.com/search?hl=en&q=define%3A+root+beer>

    Good stuff, that root beer! I like birch beer as well.

    --
    -bts
    -This space intentionally left blank.
     
    Beauregard T. Shagnasty, Mar 28, 2005
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    846
    Kevin Spencer
    May 17, 2005
  2. Michel

    posting form using text link

    Michel, Oct 31, 2003, in forum: HTML
    Replies:
    10
    Views:
    1,084
    Michel
    Nov 3, 2003
  3. Andrew
    Replies:
    2
    Views:
    125
    Andrew
    Feb 18, 2009
  4. schruthensis
    Replies:
    18
    Views:
    797
    Matt Garrish
    Jan 7, 2006
  5. Wouter
    Replies:
    14
    Views:
    309
Loading...

Share This Page