Re: Asp - How Do i print after I validate a form by Auric__
Auric__
Thu Jun 17 04:03:18 CDT 2004
On Thu, 17 Jun 2004 01:18:15 -0700, test wrote:
>I have an ASP form that I use validation code on. I am a newbie at ASP and
>I am not very familiar with VB Script. I want to print the form after it
>has been validated as part of the vb code. But I do not want to have the
>form print unless it is validated.
>
>Any ideas on how to do this? I did add a simple javascript command to
>print. But it prints whether the form is validated or not.
>
>Thanks for any help,
>Ryan Nielsen
Just tell your ASP to only add the Javascript print command if the
validation is successful.
<%
' your validation code here
' ...
' set a variable indicating whether or not page
' was successfully validated
If [validated] Then
foo = True
Else
foo = False
End If
%>
Then for the "print" script:
<% If foo Then %>
<SCRIPT LANGUAGE="Javascript">
document.print () // or whatever the command is
</SCRIPT>
<% End if %>
--
auric underscore underscore at hotmail dot com
*****
Still breathing! Good sign.
-- Dr. Vindaloo