Posted by david on 2. March 2009 14:33
events
Johnson, Scot, Keith Ballinger, Davis Chapman, and Steve Potts. "Chapter 14 - Speaking to the Web Client: The Response...". Special Edition Using Active Server Pages. Que.
what I can’t figure out yet is how to limit the script to post-submit. right now, script runs when page is loaded.
Ok – got clientside button calling a sub that accesses form data.
2009 03 02 003
<html>
<head>
<script language="vbscript">
1:
2:
3: sub CheckAndRespond()
4: dim accessform
5: accessform = myform.numbers.value
6: MsgBox "Sub CheckAndRepond: ' " & accessform & " '"
7: end sub
8:
9:
</script>
<title>2009 03 02 003</title>
</head>
<body>
<a href="../../Default.aspx">Project Page</a> / 2009 03 02 003
<form name="myform" method="post">
<input name="numbers" type="text">
</form>
<input type="button" id="Button1" value="CheckAndRespond" onclick="CheckAndRespond()"/>
</body>
</html>
funny thing is, if you hit enter after putting in data, the form submits. But. & this is good for the time being, the little checkandrepond sub does not fire.