ProblemYou want to make an HTML text link execute a form. SolutionUse JavaScript to trigger the form: <form name="msgform" method="get" action="results.php"> <label for="fmmsg">Message</label> <textarea name="fmmsg" accesskey="m" rows="5" cols="14"></textarea> <a href="javascript:document.msgform.submit( );">Submit</a> </form> DiscussionWhile Recipe 6.10 showed how to disguise a Submit button to look like HTML text, this recipe showcases how to make a text link work as a Submit button. The main negative to this approach is that the user needs to have JavaScript in order for it to work. Browsers without JavaScript or ones that have JavaScript turned off will not be able to use the form. See AlsoRecipe 7.10 for creating a Submit button that looks like an HTML text link. |