Is there a way to submit a form from text link?

Discussion in 'HTML & Website Design' started by phantom, Nov 9, 2007.

  1. #1
    Is there a way to submit a form from text link? Preferably without using javascript?
     
    phantom, Nov 9, 2007 IP
  2. Jimmy Paddy

    Jimmy Paddy Peon

    Messages:
    19
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Good question....

    Unfortunately the only way I know uses JS... But does have a noscript alternative which will show the normal submit button if the user does not have JS enabled.

    
    <a href="javascript:document.FORM-NAME.submit();">Click here</a>
    <noscript><input type="submit" name="Click here"></noscript>
    Code (markup):
     
    Jimmy Paddy, Nov 10, 2007 IP
  3. Jimmy Paddy

    Jimmy Paddy Peon

    Messages:
    19
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You might also want to put this within the same 'noscript' tag: (So that the text link does not actually show when JS in disabled)

    <style type="text/css">
    #form1 a { display:none; } 
    </style>
    Code (markup):
     
    Jimmy Paddy, Nov 10, 2007 IP
  4. phantom

    phantom Well-Known Member

    Messages:
    1,509
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    140
    #4
    Jimmy ok thanks.....I guess I have to use javascript then:

    I appreciate the help....thank you!
     
    phantom, Nov 10, 2007 IP