navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Form error

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Form error
Page: [1]
 
xterradane

 

Posts: 143
From: Mobile, AL USA
Status: offline

 
Form error - 2/5/2002 10:16:47   
I have a form (Registration.asp)and when it is submitted (Add.asp) it checks a couple of fields for validation. If it is incorrect it sends the person back to the form telling them something was wrong. I want to be able to fill in the fields with what they had previously did. I would prefer to not use Sessions either.

Thanks,
Gail

 
rdouglass

 

Posts: 9228
From: Biddeford, ME USA
Status: offline

 
RE: Form error - 2/5/2002 12:30:02   
How does it go back to the page? Does it do a POST, a "JavaScript:onClick=history.go(-1)", or what.

If you're using JavaScript, you should be able to pass values back using a querystring; something like:

<head>
<SCRIPT type="text/javascript" language="JavaScript">
<!--
function back_up(url) {
window.location(url);
}
// -->
</SCRIPT>
</head>
<body>
(Your form validation code)

<% IF validation_fail THEN %>
<SCRIPT language="JavaScript">
back_up('myFormPage.asp?Field1=<%=Request.Form("Field1")%>&Field2=<%=Request.Form("Field2")%>')
</script>
<%END IF%>
</body>

Now this will involve defaulting your form fields on the form page by doing something like:

<input type="text" name="Field1" size="20" value="<%=Request.Querystring("Field1")%>>

Does that make sense?? At least, that's probably the way I would approach it...I'm sure that's not the only way....

Edited by - rdouglass on 02/05/2002 12:33:10

(in reply to xterradane)
xterradane

 

Posts: 143
From: Mobile, AL USA
Status: offline

 
RE: Form error - 2/5/2002 17:45:50   
It goes back via Response.Redirect "Registration.asp?Action=InvalidEntry"

If this is not the best way to approach then please let me know. I am trying to stay away from Javascript b/c a lot of my target audience could potentially have it turned off.

Gail

 

(in reply to xterradane)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Form error
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts