Click to See Complete Forum and Search --> : Another ASP form question
vbuser1976
Jul 2nd, 2001, 01:41 PM
Hi again everyone!
Here is what I would like to do (please view image attached):
I have a form with one field in it. Once I put data in it and click the "Show Alarm/Access Codes" button, it should show all needed information on the same page below the form. Is this possible? If so, can anyone post some sample code or link me to a page that would have some code? Thanks in advance.
JoshT
Jul 2nd, 2001, 01:59 PM
Just have the same ASP page handle the form. If data is posted, fill out the info, if not, leave it blank.
vbuser1976
Jul 2nd, 2001, 02:04 PM
Thanks for your help. I guess what I am trying to find out is if it is possible to create a OnSubmit_Click sub in VBScript like in VB?
JoshT
Jul 2nd, 2001, 02:16 PM
In javascript the button should have an "onClick=''" event...
DevilRise
Jul 3rd, 2001, 07:49 AM
you dont have to bother about OnSubmit or OnClick.
the form tag is like :
<Form method=POST action="process.asp">
' In here you should have your
</Form>
what you need in your process.asp page is to check if the submit button was clicked assuming your button is named submit:
IF Len(Request.Form("Submit")) then
'open the connection and select the required record
'assign the results to the variables you dimmed
ELSE
'Just display the form
' and the empty variables. (nothing displayd)
END IF
so as you see,
you will open the connection and select the record only if it is needed. :)
now,
vbuser1976
Jul 3rd, 2001, 07:56 AM
Thank you all for your input. I will try all options.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.