Advertisement
ASP_Volume2 Forms Validation Processing #39568

Form Post from Javascript

Heres and example of using javascript to submit a form post. http://www.truegeeks.com/asp/mam/osdoc/osframe.asp

AI

एआई सारांश: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

सोर्स कोड
original-source
<HTML>
<BODY>
<SCRIPT LANGUAGE=javascript>
function dosubmit() {
document.forms[0].action = "test3.asp"
document.forms[0].method = "POST"
document.forms[0].submit()
}
</script>
<FORM NAME=FORM1>
<INPUT TYPE=BUTTON NAME=BT1 VALUE="Some value to post" onClick="dosubmit()"><br>
</FORM>
</BODY>
</HTML>
The "Test3.asp" code:
<HTML>
<BODY>
<H2>Test Post from Javascript</H2>
<%
BT1 = request.form("BT1")
if BT1 = "" then
  response.write "BT1 value not posted."
else
  response.write "BT1 value posted = " & BT1
endif
%>
</BODY>
</HTML>
Top of Form 1
 
Bottom of Form 1
मूल टिप्पणियाँ (3)
Wayback Machine से पुनर्प्राप्त