Can't Figure this out (Getting Closer)
Hello Again:
This is what I have come up with, except it still does not work.
Can someone please tell me why. I took this straight out of the VBSCRIPT REFERENCE MANUAL (WROX PRESS). I just plugged in some of my own code to make it simple for testing. My button shows up and when it is clicked down at the bottom of the browser window it just say (error on page).
<html>
<head>
<title>Untitled</title>
<Script language="VBScript" EVENT="OnClick" FOR="cmdtest">
response.write "this is a test"
</script>
</head>
<body>
<form action="RegNewCustomer.htm" method="POST">
<input type="hidden" name="SOSO" value="YES">
</form>
<input type=Image src="images/tobuy.jpg" id="cmdtest" name="cmdtest" width="81" height="20" border=0>
</body>
</html>
I have tried putting the <input type=Image src="images/tobuy.jpg" id="cmdtest" name="cmdtest" width="81" height="20" border=0> between the from tags but when I do that the form is submitted.
I have to process code before the form can be submitted.
Thanks again.
Re: Can't figure this out?
Quote:
Originally posted by damica
1.
<%if x=1 then
"document.FormName.submit();"
else ??????????????(what ever)
end if%>
2.
<%Sub Name()
"document.FormName.submit();"
end sub%>
Thanks again
Answers:
VB Code:
1.
<%if x=1 then%>
<script>document.FormName.Submit();</script>
<%else
'do watever you need
end if%>
2.
<%Sub Name()%>
<script>document.FormName.submit();</script>
<%end sub%>