|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
building a form based on valid data entry (ASP)
I am new at asp. I am trying to create an online form, that builds progressively as the user fills it in and validates some parts of it. My problem is I don't know how to "go validate" and come back into the page to "write" more of the page if the data was valid.
Could anyone please look at: http://www-app2.wa.gov/dshs/trial/ddd/casis.html ? I have a demo set up as html and javascript that demonstrates the functionality of what I'm trying to accomplish (I'm building a separate asp page, this was just a demo). Here's what needs to happen: The user enters a case # and hits the submit button. The submit button initiates the validation process (not sure how to do this without going to another page that runs the stored procedure) If the case # is valid, then another section of the form appears (use reponse.write?). Some of the fields in the form will be pre-populated and I will disable those fields so the user can't change them. The user will fill in some fields. Lastly, for that section, the user will enter the Provider # and the process will repeat on down the page. At the very end the user will submit the entire form. What I can't get past mentally, that if the case # and Provider # are validated using form submittal, and then the entire thing is a form , that this is nested forms! Ugh. I feel so dumb on this. Believe me, when I finally get this my life will never be the same! Thanks! |
|
#2
|
||||
|
||||
|
Ouch, could be a major error there. Looking at the page I got:
<%@language=vbscript%> <%option explicit%> <% ON ERROR RESUME NEXT dim strID, strPassword, varLogon 'bring in logon info from logon.asp strID = Request.Form("ID") strPassword = Request.Form("password") 'pass string values from form to stored procedure, set to local variable varLogon = "exec spLogon " & "'" & strPassword & "'" & "," & "'" & strID & "'" 'response.write varLogon 'create recordset from results of stored procedure dim objRSLogon, staffName, ruNumber, region, workerNum set objRSLogon = Server.CreateObject("ADODB.Recordset") Set objRSLogon = objConn.Execute(varLogon) staffName = objRSLogon("StaffName") ruNumber = objRSLogon("RUnumber") region = objRSLogon("Region") workerNum = objRSLogon("CaseManagerID") Set objRSLogon = objConn.Execute(varLogon) 'if Err<>0 then ' Response.write("Error is " & Err.description & " ") ' Response.end 'end if 'if NOT objRSLogon.EOF then ' staffName = objRSLogon("StaffName") ' ruNumber = objRSLogon("RUnumber") ' region = objRSLogon("Region") 'workerNum = objRSLogon("CaseManagerID") 'else 'Response.write("No records") 'end if %> Not too good is that, could cause security problems if you let code be visible by accident. Usually for a form that builds as things are entered you post the form to itself.. |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > building a form based on valid data entry (ASP) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|