SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Sep 2008
    Location
    Dubai
    Posts
    971
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    submit form by a link

    Hi,

    How can we submit form without an submit button but a link ? I guess there must be JavaScript involved.

  2. #2
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML Code:
    <html>
    <head>
    	<script type="text/javascript">
    	function formSubmit(){
    		document.testform.submit();
    	}
    	</script>
    </head>
    <body>
    <form name="testform" action="test. php" method="post">
    <input type="text" name="test">
    <a href="javascript: formSubmit();">Submit</a>
    </form>
    </body>
    </html>
    That should help
    TwittFlick - Movie discussion on twitter, news & reviews.

    We're giving away a 40" 3D TV!!!


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
  •