I have an asp page with a form that collects name, email address, etc. the
form page posts to itself so what I do is check to see if the request method
is POST and if it is I grab the data, do something with it, and display a
message below the form. I want to implement an image verification (captcha)
system. the problem I have is that when you submit the form if the captcha
test fails, all the info you entered into the form is cleared and the user
has to start over. I want the info to stay until the form is successfully
submitted. now, I can set the default value of the text fields to
request.form("fieldname"), but the problem here is that I WANT the info to
be cleared when the form is submitted (users are used to this happening and
if the data stays in the form after a good submission they will be confused)
is there something clever I can do here? 10 1485
"6" <no@spam.comwrote in message
news:Oz**************@TK2MSFTNGP02.phx.gbl...
I have an asp page with a form that collects name, email address, etc. the
form page posts to itself so what I do is check to see if the request
method
is POST and if it is I grab the data, do something with it, and display a
message below the form. I want to implement an image verification
(captcha)
system. the problem I have is that when you submit the form if the captcha
test fails, all the info you entered into the form is cleared and the user
has to start over. I want the info to stay until the form is successfully
submitted. now, I can set the default value of the text fields to
request.form("fieldname"), but the problem here is that I WANT the info to
be cleared when the form is submitted (users are used to this happening
and
if the data stays in the form after a good submission they will be
confused)
>
is there something clever I can do here?
Function GetDefault(Name)
If mbFailed Then
GetDefault = Server.HTMLEncode(Request.Form(Name))
End If
End Function
<input value="<%=GetDefault("field1")% name="field1" />
I would recommend that you make yourself familar with the VBScript language
such constructs as If Else End If and Function are really useful sometimes.
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>
"6" <no@spam.comwrote in message
news:Oz**************@TK2MSFTNGP02.phx.gbl...
>I have an asp page with a form that collects name, email address, etc. the form page posts to itself so what I do is check to see if the request
method
>is POST and if it is I grab the data, do something with it, and display a message below the form. I want to implement an image verification
(captcha)
>system. the problem I have is that when you submit the form if the captcha test fails, all the info you entered into the form is cleared and the user has to start over. I want the info to stay until the form is successfully submitted. now, I can set the default value of the text fields to request.form("fieldname"), but the problem here is that I WANT the info to be cleared when the form is submitted (users are used to this happening
and
>if the data stays in the form after a good submission they will be
confused)
>> is there something clever I can do here?
Function GetDefault(Name)
If mbFailed Then
GetDefault = Server.HTMLEncode(Request.Form(Name))
End If
End Function
<input value="<%=GetDefault("field1")% name="field1" />
I would recommend that you make yourself familar with the VBScript
language
such constructs as If Else End If and Function are really useful
sometimes.
close but doesnt work. it keeps the data even when the verification is
successful. you should try it out and youll see.
anyone else have any ideas?
"SLH" <SL*@SLH.SLHwrote in message
news:uO**************@TK2MSFTNGP04.phx.gbl...
>
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
"6" <no@spam.comwrote in message
news:Oz**************@TK2MSFTNGP02.phx.gbl...
I have an asp page with a form that collects name, email address, etc.
the
form page posts to itself so what I do is check to see if the request
method
is POST and if it is I grab the data, do something with it, and display
a
message below the form. I want to implement an image verification
(captcha)
system. the problem I have is that when you submit the form if the
captcha
test fails, all the info you entered into the form is cleared and the
user
has to start over. I want the info to stay until the form is
successfully
submitted. now, I can set the default value of the text fields to
request.form("fieldname"), but the problem here is that I WANT the info
to
be cleared when the form is submitted (users are used to this happening
and
if the data stays in the form after a good submission they will be
confused)
>
is there something clever I can do here?
Function GetDefault(Name)
If mbFailed Then
GetDefault = Server.HTMLEncode(Request.Form(Name))
End If
End Function
<input value="<%=GetDefault("field1")% name="field1" />
I would recommend that you make yourself familar with the VBScript
language
such constructs as If Else End If and Function are really useful
sometimes.
close but doesnt work. it keeps the data even when the verification is
successful. you should try it out and youll see.
anyone else have any ideas?
Yep it were broken here's one that works:-
<%
Dim mbFailed : mbFailed = True
If Request.ServerVariables("HTTP_METHOD") = "POST" Then
mbFailed = LCase(Request.Form("field1")) <"bad"
End If
%>
<html>
<body>
<form method="POST" action="test.asp">
<input name="field1" value="<%=GetDefault("field1")%>" />
<input type="submit" value="Post" />
</body>
</html>
<%
Function GetDefault(Name)
If Not mbFailed Then
GetDefault = Server.HTMLEncode(Request.Form(Name))
End If
End Function
%>
dude... all due respect, that doesnt even DO anything.
thanks for your help but if youre not going to provide a complete working
example id rather give up now
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:uv**************@TK2MSFTNGP05.phx.gbl...
>
"SLH" <SL*@SLH.SLHwrote in message
news:uO**************@TK2MSFTNGP04.phx.gbl...
>> "Anthony Jones" <An*@yadayadayada.comwrote in message news:%2****************@TK2MSFTNGP05.phx.gbl...
>
"6" <no@spam.comwrote in message
news:Oz**************@TK2MSFTNGP02.phx.gbl... I have an asp page with a form that collects name, email address, etc. the form page posts to itself so what I do is check to see if the request
method is POST and if it is I grab the data, do something with it, and display
a
>message below the form. I want to implement an image verification
(captcha) system. the problem I have is that when you submit the form if the captcha test fails, all the info you entered into the form is cleared and the user has to start over. I want the info to stay until the form is
successfully
>submitted. now, I can set the default value of the text fields to request.form("fieldname"), but the problem here is that I WANT the info to be cleared when the form is submitted (users are used to this happening
and if the data stays in the form after a good submission they will be
confused)
is there something clever I can do here?
Function GetDefault(Name)
If mbFailed Then
GetDefault = Server.HTMLEncode(Request.Form(Name))
End If
End Function
<input value="<%=GetDefault("field1")% name="field1" />
I would recommend that you make yourself familar with the VBScript
language
such constructs as If Else End If and Function are really useful
sometimes.
close but doesnt work. it keeps the data even when the verification is successful. you should try it out and youll see. anyone else have any ideas?
Yep it were broken here's one that works:-
<%
Dim mbFailed : mbFailed = True
If Request.ServerVariables("HTTP_METHOD") = "POST" Then
mbFailed = LCase(Request.Form("field1")) <"bad"
End If
%>
<html>
<body>
<form method="POST" action="test.asp">
<input name="field1" value="<%=GetDefault("field1")%>" />
<input type="submit" value="Post" />
</body>
</html>
<%
Function GetDefault(Name)
If Not mbFailed Then
GetDefault = Server.HTMLEncode(Request.Form(Name))
End If
End Function
%>
"6" <no@spam.comwrote in message
news:Oz**************@TK2MSFTNGP02.phx.gbl...
>I have an asp page with a form that collects name, email address, etc. the form page posts to itself so what I do is check to see if the request method is POST and if it is I grab the data, do something with it, and display a message below the form. I want to implement an image verification (captcha) system. the problem I have is that when you submit the form if the captcha test fails, all the info you entered into the form is cleared and the user has to start over. I want the info to stay until the form is successfully submitted. now, I can set the default value of the text fields to request.form("fieldname"), but the problem here is that I WANT the info to be cleared when the form is submitted (users are used to this happening and if the data stays in the form after a good submission they will be confused)
is there something clever I can do here?
This is *really* clever. Don't show the form after a successful submission.
It confuses users.
--
Mike Brind
would be even more clever to read closely. i never said "dont show the
form", clearly what i said was that the data the user just typed should be
cleared, which is the default behavior on every form on the web.
so, any *clever* ideas?
"Mike Brind" <pa*******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>
"6" <no@spam.comwrote in message
news:Oz**************@TK2MSFTNGP02.phx.gbl...
>>I have an asp page with a form that collects name, email address, etc. the form page posts to itself so what I do is check to see if the request method is POST and if it is I grab the data, do something with it, and display a message below the form. I want to implement an image verification (captcha) system. the problem I have is that when you submit the form if the captcha test fails, all the info you entered into the form is cleared and the user has to start over. I want the info to stay until the form is successfully submitted. now, I can set the default value of the text fields to request.form("fieldname"), but the problem here is that I WANT the info to be cleared when the form is submitted (users are used to this happening and if the data stays in the form after a good submission they will be confused)
is there something clever I can do here?
This is *really* clever. Don't show the form after a successful
submission. It confuses users.
--
Mike Brind
I read your post closely enough to wonder why on earth you would want to
present a blank form to users *after* a successful submission. This is
*not* the behaviour that most users would expect, which is why you never see
any professional site do it. The only time I present a blank form after
successful submission is if I expect further submissions from the same user.
If you wanted to allow users to make multiple submissions, you would not
want to clear their name, address etc. You would retain it, so this is
obviously not what you are doing. I suggest you do something new for you -
take your head out of your arse and think about it for just one nanosecond.
But if you are insistent on showing blank forms, go ahead. Go with
Anthony's suggestion to try and understand If... Then... Else. What you
want to do is very simply solved with a basic understanding of the
construct.
In your first post as "Jimmy" you said you have a "client", which suggests
you are getting paid to create whatever app it is you are posting about. So
far as I can see, you have contributed nothing to it, but relied on people
here to do it all for you. Now you have insulted and abused so many of us
that no one is prepared to help you any more, so you keep changing your
identity.
Well, Jimmy/Joe Reynolds/SLH/6/Jim D - you are on your own as far as I am
concerned.
Good bye.
"Jim D" <no@spam.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
would be even more clever to read closely. i never said "dont show the
form", clearly what i said was that the data the user just typed should be
cleared, which is the default behavior on every form on the web.
so, any *clever* ideas?
"Mike Brind" <pa*******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>> "6" <no@spam.comwrote in message news:Oz**************@TK2MSFTNGP02.phx.gbl...
>>>I have an asp page with a form that collects name, email address, etc. the form page posts to itself so what I do is check to see if the request method is POST and if it is I grab the data, do something with it, and display a message below the form. I want to implement an image verification (captcha) system. the problem I have is that when you submit the form if the captcha test fails, all the info you entered into the form is cleared and the user has to start over. I want the info to stay until the form is successfully submitted. now, I can set the default value of the text fields to request.form("fieldname"), but the problem here is that I WANT the info to be cleared when the form is submitted (users are used to this happening and if the data stays in the form after a good submission they will be confused)
is there something clever I can do here?
This is *really* clever. Don't show the form after a successful submission. It confuses users.
-- Mike Brind
>if youre not going to provide a complete working example id rather give
up now
What a ridiculous comment!
I'd suggest that you just give up. You obviously have no aptitude or desire
for this, dude.
Bob Lehmann
"SLH" <SL*@SLH.SLHwrote in message
news:OW**************@TK2MSFTNGP03.phx.gbl...
dude... all due respect, that doesnt even DO anything.
thanks for your help but if youre not going to provide a complete working
example id rather give up now
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:uv**************@TK2MSFTNGP05.phx.gbl...
"SLH" <SL*@SLH.SLHwrote in message
news:uO**************@TK2MSFTNGP04.phx.gbl...
>
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
"6" <no@spam.comwrote in message
news:Oz**************@TK2MSFTNGP02.phx.gbl...
I have an asp page with a form that collects name, email address,
etc.
the
form page posts to itself so what I do is check to see if the
request
method
is POST and if it is I grab the data, do something with it, and
display
a
message below the form. I want to implement an image verification
(captcha)
system. the problem I have is that when you submit the form if the
captcha
test fails, all the info you entered into the form is cleared and
the
user
has to start over. I want the info to stay until the form is
successfully
submitted. now, I can set the default value of the text fields to
request.form("fieldname"), but the problem here is that I WANT the
info
to
be cleared when the form is submitted (users are used to this
happening
and
if the data stays in the form after a good submission they will be
confused)
is there something clever I can do here?
Function GetDefault(Name)
If mbFailed Then
GetDefault = Server.HTMLEncode(Request.Form(Name))
End If
End Function
<input value="<%=GetDefault("field1")% name="field1" />
I would recommend that you make yourself familar with the VBScript
language
such constructs as If Else End If and Function are really useful
sometimes.
close but doesnt work. it keeps the data even when the verification is
successful. you should try it out and youll see.
anyone else have any ideas?
Yep it were broken here's one that works:-
<%
Dim mbFailed : mbFailed = True
If Request.ServerVariables("HTTP_METHOD") = "POST" Then
mbFailed = LCase(Request.Form("field1")) <"bad"
End If
%>
<html>
<body>
<form method="POST" action="test.asp">
<input name="field1" value="<%=GetDefault("field1")%>" />
<input type="submit" value="Post" />
</body>
</html>
<%
Function GetDefault(Name)
If Not mbFailed Then
GetDefault = Server.HTMLEncode(Request.Form(Name))
End If
End Function
%>
"SLH" <SL*@SLH.SLHwrote in message
news:OW**************@TK2MSFTNGP03.phx.gbl...
dude... all due respect, that doesnt even DO anything.
thanks for your help but if youre not going to provide a complete working
example id rather give up now
Works fine. Does what you asked. If the input doesn't validate (in this
case typing the word 'bad') the form comes back with the data still intact
else it comes back blank.
>
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:uv**************@TK2MSFTNGP05.phx.gbl...
"SLH" <SL*@SLH.SLHwrote in message
news:uO**************@TK2MSFTNGP04.phx.gbl...
>
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
"6" <no@spam.comwrote in message
news:Oz**************@TK2MSFTNGP02.phx.gbl...
I have an asp page with a form that collects name, email address,
etc.
the
form page posts to itself so what I do is check to see if the
request
method
is POST and if it is I grab the data, do something with it, and
display
a
message below the form. I want to implement an image verification
(captcha)
system. the problem I have is that when you submit the form if the
captcha
test fails, all the info you entered into the form is cleared and
the
user
has to start over. I want the info to stay until the form is
successfully
submitted. now, I can set the default value of the text fields to
request.form("fieldname"), but the problem here is that I WANT the
info
to
be cleared when the form is submitted (users are used to this
happening
and
if the data stays in the form after a good submission they will be
confused)
is there something clever I can do here?
Function GetDefault(Name)
If mbFailed Then
GetDefault = Server.HTMLEncode(Request.Form(Name))
End If
End Function
<input value="<%=GetDefault("field1")% name="field1" />
I would recommend that you make yourself familar with the VBScript
language
such constructs as If Else End If and Function are really useful
sometimes.
close but doesnt work. it keeps the data even when the verification is
successful. you should try it out and youll see.
anyone else have any ideas?
Yep it were broken here's one that works:-
<%
Dim mbFailed : mbFailed = True
If Request.ServerVariables("HTTP_METHOD") = "POST" Then
mbFailed = LCase(Request.Form("field1")) <"bad"
End If
%>
<html>
<body>
<form method="POST" action="test.asp">
<input name="field1" value="<%=GetDefault("field1")%>" />
<input type="submit" value="Post" />
</body>
</html>
<%
Function GetDefault(Name)
If Not mbFailed Then
GetDefault = Server.HTMLEncode(Request.Form(Name))
End If
End Function
%>
if youre lonely and pathetic enough to care, we work in teams of 2
developers, and share a dev station. rarely does anyone care enoguh to
change the name on the OE profile used for posting, hence the several names.
and one other thing... "arse"?
"Mike Brind" <pa*******@hotmail.comwrote in message
news:O6****************@TK2MSFTNGP03.phx.gbl...
>I read your post closely enough to wonder why on earth you would want to present a blank form to users *after* a successful submission. This is *not* the behaviour that most users would expect, which is why you never see any professional site do it. The only time I present a blank form after successful submission is if I expect further submissions from the same user. If you wanted to allow users to make multiple submissions, you would not want to clear their name, address etc. You would retain it, so this is obviously not what you are doing. I suggest you do something new for you - take your head out of your arse and think about it for just one nanosecond.
But if you are insistent on showing blank forms, go ahead. Go with
Anthony's suggestion to try and understand If... Then... Else. What you
want to do is very simply solved with a basic understanding of the
construct.
In your first post as "Jimmy" you said you have a "client", which suggests
you are getting paid to create whatever app it is you are posting about.
So far as I can see, you have contributed nothing to it, but relied on
people here to do it all for you. Now you have insulted and abused so
many of us that no one is prepared to help you any more, so you keep
changing your identity.
Well, Jimmy/Joe Reynolds/SLH/6/Jim D - you are on your own as far as I am
concerned.
Good bye.
"Jim D" <no@spam.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>would be even more clever to read closely. i never said "dont show the form", clearly what i said was that the data the user just typed should be cleared, which is the default behavior on every form on the web.
so, any *clever* ideas?
"Mike Brind" <pa*******@hotmail.comwrote in message news:%2****************@TK2MSFTNGP05.phx.gbl...
>>> "6" <no@spam.comwrote in message news:Oz**************@TK2MSFTNGP02.phx.gbl... I have an asp page with a form that collects name, email address, etc. the form page posts to itself so what I do is check to see if the request method is POST and if it is I grab the data, do something with it, and display a message below the form. I want to implement an image verification (captcha) system. the problem I have is that when you submit the form if the captcha test fails, all the info you entered into the form is cleared and the user has to start over. I want the info to stay until the form is successfully submitted. now, I can set the default value of the text fields to request.form("fieldname"), but the problem here is that I WANT the info to be cleared when the form is submitted (users are used to this happening and if the data stays in the form after a good submission they will be confused)
is there something clever I can do here?
This is *really* clever. Don't show the form after a successful submission. It confuses users.
-- Mike Brind This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dave Vandervies |
last post by:
I just fixed a bug that some of the correctness pedants around here may
find useful as ammunition.
The problem was that some code would, very occasionally, die with a
segmentation violation...
|
by: Bruno R. Dias |
last post by:
Perhaps it would be interesting to program a virtual machine simulating
an ancient computer (such as the pdp-7). Then, it would be rather
interesting to code for it (porting gcc to it maybe?). I...
|
by: David Sworder |
last post by:
Hi,
I'm developing an application that will support several thousand
simultaneous connections on the server-side. I'm trying to maximize
throughput. The client (WinForms) and server communicate...
|
by: Rakesh Roberts |
last post by:
I think I have a very interesting cookie problem.
I use form authentications on my application. Through out my
application I started using a toggle control that persists its value
for the session...
|
by: sasifiqbal |
last post by:
Hi,
One of my developers are facing an interesting problem regarding
UserControl invalidation.
The problem is:
We have two forms in our application. Form A does nothing except
loading of...
|
by: Frederick Gotham |
last post by:
I thought it might be interesting to share experiences of tracking down a
subtle or mysterious bug. I myself haven't much experience with tracking
down bugs, but there's one in particular which...
|
by: per9000 |
last post by:
An interesting/annoying problem.
I created a small example to provoke an exception I keep getting.
Basically I have a C-struct (Container) with a function-pointer in it.
I perform repeated calls...
|
by: Will Honea |
last post by:
I've hit an interesting trap trying to migrate data off an OS/2 server
running version 7.2 (fp14) over to 8.2 on Linux. Seems that one table has
a column defined in the DDL as "BIGINT NOT NULL...
|
by: onkar.n.mahajan |
last post by:
Is it possible to from function call on fly in C programming
language ?
I am faced with an interesting problem in that I need to take function
name and arguments on fly (actually from Database...
|
by: Andrew |
last post by:
I am having an interesting namespace conflict. When we use a third party
lib we create a company assembly for any descending classes to go in. I
have simplified the problem into the example...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
| |