HOWTO: Submitting a Form From an Anchor (<A HREF=...>).ID: Q166210
|
This article describes how a form can be submitted to a server through the use of an anchor. It uses the little-known ability of JScript that allows you to run a script from an anchor without using events.
There are two simple steps to submitting a form from an anchor:
<FORM NAME=Form1 ACTION="http://myServerURL/MyPage.asp" METHOD=POST>
</FORM>
<A HREF="JAVASCRIPT:Form1.submit()"> Something </A>
NOTE: JavaScript is case-sensitive, so submit must be spelled all lowercase.
For additional information on JScript and forms visit the MSDN Online Web Workshop:
http://msdn.microsoft.com/workshop/
Additional query words: jscript javascript script
Keywords : kbJScript100 kbJScript300 kbJScript500 vbObjMdlIE vbObjMdlOther
Version : 1.0
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: April 29, 1999