-
how to validate the form fields..?
hi all
I want to validate the form fields,but i don't want to use clientside validation.
Once the first form is submitted its should go to another form and check
for validation if the required values r not there then it should redirect
to previous form with values and display one error msg according to the missing
value.
do any one have idea how to do this,pls help me.
thanks in advance.
ahmed
-
Re: how to validate the form fields..?
Validation page:
check each value
if something isn't right
create form -- action=form page to go back to
hidden field "errortext" -- value = message to display
put all request.form values into hidden fields:
<% for each x in request.form
response.write "<input type='hidden' name='" & x &
"' value='" & request.form(x) & "'>"
next %>
submit the form automatically: <body onLoad="form1.submit">
else process the data and go on
Form page:
response.write request.form("errortext") -- with a style to make it
stand out
default value for all fields = request.form value for that field
<input name='whatever' value='<%= request.form("whatever")%>'>
"ahmed" <basheer_ad@hotmail.com> wrote in message
news:3d7c770b$1@10.1.10.29...
>
> hi all
> I want to validate the form fields,but i don't want to use
clientside validation.
> Once the first form is submitted its should go to another form and
check
> for validation if the required values r not there then it should
redirect
> to previous form with values and display one error msg according to
the missing
> value.
-
Re: how to validate the form fields..?
Hi Kris
Ur code is working,but its not submitting automatically,If we submit through
submit button its working,but when we give <onload="form1.submit">...its
not working,How to solve this
my code is here.....
<% sub errorform(byval backpage,byval errormsg)%>
<Form method=post action="<%=backpage%>" id=form1 name=form1 onload=form1.submit>
<%for each element in Request.Form%>
<input name="<%=element%>" type=hidden
value="<%=Server.HTMLEncode(Request.Form(element))%>">
<%next%>
<input type=hidden name="errortext" value="<%=errormsg%>">
</form>
<%end sub
dim username
username=trim(Request.Form("username"))
if username="" then
errorform "checkout.asp","Please Enter The First Name"
end if %>
pls help me to fix this prob,thank u
basheer
"Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
>Validation page:
>check each value
>if something isn't right
> create form -- action=form page to go back to
> hidden field "errortext" -- value = message to display
> put all request.form values into hidden fields:
> <% for each x in request.form
> response.write "<input type='hidden' name='" & x &
>"' value='" & request.form(x) & "'>"
> next %>
> submit the form automatically: <body onLoad="form1.submit">
>else process the data and go on
>
>Form page:
>response.write request.form("errortext") -- with a style to make it
>stand out
>default value for all fields = request.form value for that field
> <input name='whatever' value='<%= request.form("whatever")%>'>
>
>"ahmed" <basheer_ad@hotmail.com> wrote in message
>news:3d7c770b$1@10.1.10.29...
>>
>> hi all
>> I want to validate the form fields,but i don't want to use
>clientside validation.
>> Once the first form is submitted its should go to another form and
>check
>> for validation if the required values r not there then it should
>redirect
>> to previous form with values and display one error msg according to
>the missing
>> value.
>
>
-
Re: how to validate the form fields..?
onLoad (note the capitalization) goes into the <body> tag, not the
<form> tag.
"ahmed" <basheer_ad@hotmail.com> wrote in message
news:3d7dd806$1@10.1.10.29...
>
> Hi Kris
> Ur code is working,but its not submitting automatically,If we submit
through
> submit button its working,but when we give
<onload="form1.submit">...its
> not working,How to solve this
> my code is here.....
>
> <% sub errorform(byval backpage,byval errormsg)%>
>
> <Form method=post action="<%=backpage%>" id=form1 name=form1
onload=form1.submit>
>
> <%for each element in Request.Form%>
>
> <input name="<%=element%>" type=hidden
> value="<%=Server.HTMLEncode(Request.Form(element))%>">
> <%next%>
> <input type=hidden name="errortext" value="<%=errormsg%>">
> </form>
> <%end sub
>
>
> dim username
> username=trim(Request.Form("username"))
>
> if username="" then
> errorform "checkout.asp","Please Enter The First Name"
> end if %>
>
> pls help me to fix this prob,thank u
> basheer
>
>
>
>
>
>
>
>
> "Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
> >Validation page:
> >check each value
> >if something isn't right
> > create form -- action=form page to go back to
> > hidden field "errortext" -- value = message to display
> > put all request.form values into hidden fields:
> > <% for each x in request.form
> > response.write "<input type='hidden' name='" & x
&
> >"' value='" & request.form(x) & "'>"
> > next %>
> > submit the form automatically: <body onLoad="form1.submit">
> >else process the data and go on
> >
> >Form page:
> >response.write request.form("errortext") -- with a style to make it
> >stand out
> >default value for all fields = request.form value for that field
> > <input name='whatever' value='<%= request.form("whatever")%>'>
> >
> >"ahmed" <basheer_ad@hotmail.com> wrote in message
> >news:3d7c770b$1@10.1.10.29...
> >>
> >> hi all
> >> I want to validate the form fields,but i don't want to use
> >clientside validation.
> >> Once the first form is submitted its should go to another form
and
> >check
> >> for validation if the required values r not there then it should
> >redirect
> >> to previous form with values and display one error msg according to
> >the missing
> >> value.
> >
> >
>
-
Re: how to validate the form fields..?
hi
still its not working
i given like this
<body onLoad="form1.submit">
what iam doing wrong?
thanks
"Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
>onLoad (note the capitalization) goes into the <body> tag, not the
><form> tag.
>
>"ahmed" <basheer_ad@hotmail.com> wrote in message
>news:3d7dd806$1@10.1.10.29...
>>
>> Hi Kris
>> Ur code is working,but its not submitting automatically,If we submit
>through
>> submit button its working,but when we give
><onload="form1.submit">...its
>> not working,How to solve this
>> my code is here.....
>>
>> <% sub errorform(byval backpage,byval errormsg)%>
>>
>> <Form method=post action="<%=backpage%>" id=form1 name=form1
>onload=form1.submit>
>>
>> <%for each element in Request.Form%>
>>
>> <input name="<%=element%>" type=hidden
>> value="<%=Server.HTMLEncode(Request.Form(element))%>">
>> <%next%>
>> <input type=hidden name="errortext" value="<%=errormsg%>">
>> </form>
>> <%end sub
>>
>>
>> dim username
>> username=trim(Request.Form("username"))
>>
>> if username="" then
>> errorform "checkout.asp","Please Enter The First Name"
>> end if %>
>>
>> pls help me to fix this prob,thank u
>> basheer
>>
>>
>>
>>
>>
>>
>>
>>
>> "Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
>> >Validation page:
>> >check each value
>> >if something isn't right
>> > create form -- action=form page to go back to
>> > hidden field "errortext" -- value = message to display
>> > put all request.form values into hidden fields:
>> > <% for each x in request.form
>> > response.write "<input type='hidden' name='" & x
>&
>> >"' value='" & request.form(x) & "'>"
>> > next %>
>> > submit the form automatically: <body onLoad="form1.submit">
>> >else process the data and go on
>> >
>> >Form page:
>> >response.write request.form("errortext") -- with a style to make it
>> >stand out
>> >default value for all fields = request.form value for that field
>> > <input name='whatever' value='<%= request.form("whatever")%>'>
>> >
>> >"ahmed" <basheer_ad@hotmail.com> wrote in message
>> >news:3d7c770b$1@10.1.10.29...
>> >>
>> >> hi all
>> >> I want to validate the form fields,but i don't want to use
>> >clientside validation.
>> >> Once the first form is submitted its should go to another form
>and
>> >check
>> >> for validation if the required values r not there then it should
>> >redirect
>> >> to previous form with values and display one error msg according to
>> >the missing
>> >> value.
>> >
>> >
>>
>
>
-
Re: how to validate the form fields..?
"ahmed" <basheer_ad@hotmail.com> wrote in message
news:3d8d728c$1@10.1.10.29...
>
> hi
> still its not working
> i given like this
> <body onLoad="form1.submit">
> what iam doing wrong?
> thanks
>
> "Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
> >onLoad (note the capitalization) goes into the <body> tag, not the
> ><form> tag.
> >
> >"ahmed" <basheer_ad@hotmail.com> wrote in message
> >news:3d7dd806$1@10.1.10.29...
> >>
> >> Hi Kris
> >> Ur code is working,but its not submitting automatically,If we
submit
> >through
> >> submit button its working,but when we give
> ><onload="form1.submit">...its
> >> not working,How to solve this
> >> my code is here.....
> >>
> >> <% sub errorform(byval backpage,byval errormsg)%>
> >>
> >> <Form method=post action="<%=backpage%>" id=form1 name=form1
> >onload=form1.submit>
> >>
> >> <%for each element in Request.Form%>
> >>
> >> <input name="<%=element%>" type=hidden
> >> value="<%=Server.HTMLEncode(Request.Form(element))%>">
> >> <%next%>
> >> <input type=hidden name="errortext" value="<%=errormsg%>">
> >> </form>
> >> <%end sub
> >>
> >>
> >> dim username
> >> username=trim(Request.Form("username"))
> >>
> >> if username="" then
> >> errorform "checkout.asp","Please Enter The First Name"
> >> end if %>
> >>
> >> pls help me to fix this prob,thank u
> >> basheer
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> "Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
> >> >Validation page:
> >> >check each value
> >> >if something isn't right
> >> > create form -- action=form page to go back to
> >> > hidden field "errortext" -- value = message to display
> >> > put all request.form values into hidden fields:
> >> > <% for each x in request.form
> >> > response.write "<input type='hidden' name='" &
x
> >&
> >> >"' value='" & request.form(x) & "'>"
> >> > next %>
> >> > submit the form automatically: <body onLoad="form1.submit">
> >> >else process the data and go on
> >> >
> >> >Form page:
> >> >response.write request.form("errortext") -- with a style to make
it
> >> >stand out
> >> >default value for all fields = request.form value for that field
> >> > <input name='whatever' value='<%= request.form("whatever")%>'>
> >> >
> >> >"ahmed" <basheer_ad@hotmail.com> wrote in message
> >> >news:3d7c770b$1@10.1.10.29...
> >> >>
> >> >> hi all
> >> >> I want to validate the form fields,but i don't want to use
> >> >clientside validation.
> >> >> Once the first form is submitted its should go to another form
> >and
> >> >check
> >> >> for validation if the required values r not there then it should
> >> >redirect
> >> >> to previous form with values and display one error msg according
to
> >> >the missing
> >> >> value.
> >> >
> >> >
> >>
> >
> >
>
-
Re: how to validate the form fields..?
Please follow up in a client-side group, or better yet go to www.irt.org
and look through the javascript FAQs to find an example (which I would
have to do to make sure I had the syntax right before I told you
anyway).
"ahmed" <basheer_ad@hotmail.com> wrote in message
news:3d8d728c$1@10.1.10.29...
>
> hi
> still its not working
> i given like this
> <body onLoad="form1.submit">
> what iam doing wrong?
> thanks
>
> "Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
> >onLoad (note the capitalization) goes into the <body> tag, not the
> ><form> tag.
> >
> >"ahmed" <basheer_ad@hotmail.com> wrote in message
> >news:3d7dd806$1@10.1.10.29...
> >>
> >> Hi Kris
> >> Ur code is working,but its not submitting automatically,If we
submit
> >through
> >> submit button its working,but when we give
> ><onload="form1.submit">...its
> >> not working,How to solve this
> >> my code is here.....
> >>
> >> <% sub errorform(byval backpage,byval errormsg)%>
> >>
> >> <Form method=post action="<%=backpage%>" id=form1 name=form1
> >onload=form1.submit>
> >>
> >> <%for each element in Request.Form%>
> >>
> >> <input name="<%=element%>" type=hidden
> >> value="<%=Server.HTMLEncode(Request.Form(element))%>">
> >> <%next%>
> >> <input type=hidden name="errortext" value="<%=errormsg%>">
> >> </form>
> >> <%end sub
> >>
> >>
> >> dim username
> >> username=trim(Request.Form("username"))
> >>
> >> if username="" then
> >> errorform "checkout.asp","Please Enter The First Name"
> >> end if %>
> >>
> >> pls help me to fix this prob,thank u
> >> basheer
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> "Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
> >> >Validation page:
> >> >check each value
> >> >if something isn't right
> >> > create form -- action=form page to go back to
> >> > hidden field "errortext" -- value = message to display
> >> > put all request.form values into hidden fields:
> >> > <% for each x in request.form
> >> > response.write "<input type='hidden' name='" &
x
> >&
> >> >"' value='" & request.form(x) & "'>"
> >> > next %>
> >> > submit the form automatically: <body onLoad="form1.submit">
> >> >else process the data and go on
> >> >
> >> >Form page:
> >> >response.write request.form("errortext") -- with a style to make
it
> >> >stand out
> >> >default value for all fields = request.form value for that field
> >> > <input name='whatever' value='<%= request.form("whatever")%>'>
> >> >
> >> >"ahmed" <basheer_ad@hotmail.com> wrote in message
> >> >news:3d7c770b$1@10.1.10.29...
> >> >>
> >> >> hi all
> >> >> I want to validate the form fields,but i don't want to use
> >> >clientside validation.
> >> >> Once the first form is submitted its should go to another form
> >and
> >> >check
> >> >> for validation if the required values r not there then it should
> >> >redirect
> >> >> to previous form with values and display one error msg according
to
> >> >the missing
> >> >> value.
> >> >
> >> >
> >>
> >
> >
>
-
Re: how to validate the form fields..?
hi kris
Thanx for ur response
"Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
>Please follow up in a client-side group, or better yet go to www.irt.org
>and look through the javascript FAQs to find an example (which I would
>have to do to make sure I had the syntax right before I told you
>anyway).
>
>"ahmed" <basheer_ad@hotmail.com> wrote in message
>news:3d8d728c$1@10.1.10.29...
>>
>> hi
>> still its not working
>> i given like this
>> <body onLoad="form1.submit">
>> what iam doing wrong?
>> thanks
>>
>> "Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
>> >onLoad (note the capitalization) goes into the <body> tag, not the
>> ><form> tag.
>> >
>> >"ahmed" <basheer_ad@hotmail.com> wrote in message
>> >news:3d7dd806$1@10.1.10.29...
>> >>
>> >> Hi Kris
>> >> Ur code is working,but its not submitting automatically,If we
>submit
>> >through
>> >> submit button its working,but when we give
>> ><onload="form1.submit">...its
>> >> not working,How to solve this
>> >> my code is here.....
>> >>
>> >> <% sub errorform(byval backpage,byval errormsg)%>
>> >>
>> >> <Form method=post action="<%=backpage%>" id=form1 name=form1
>> >onload=form1.submit>
>> >>
>> >> <%for each element in Request.Form%>
>> >>
>> >> <input name="<%=element%>" type=hidden
>> >> value="<%=Server.HTMLEncode(Request.Form(element))%>">
>> >> <%next%>
>> >> <input type=hidden name="errortext" value="<%=errormsg%>">
>> >> </form>
>> >> <%end sub
>> >>
>> >>
>> >> dim username
>> >> username=trim(Request.Form("username"))
>> >>
>> >> if username="" then
>> >> errorform "checkout.asp","Please Enter The First Name"
>> >> end if %>
>> >>
>> >> pls help me to fix this prob,thank u
>> >> basheer
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> "Kris Eiben" <eibenkthisisforspammers@yahoo.com> wrote:
>> >> >Validation page:
>> >> >check each value
>> >> >if something isn't right
>> >> > create form -- action=form page to go back to
>> >> > hidden field "errortext" -- value = message to display
>> >> > put all request.form values into hidden fields:
>> >> > <% for each x in request.form
>> >> > response.write "<input type='hidden' name='" &
>x
>> >&
>> >> >"' value='" & request.form(x) & "'>"
>> >> > next %>
>> >> > submit the form automatically: <body onLoad="form1.submit">
>> >> >else process the data and go on
>> >> >
>> >> >Form page:
>> >> >response.write request.form("errortext") -- with a style to make
>it
>> >> >stand out
>> >> >default value for all fields = request.form value for that field
>> >> > <input name='whatever' value='<%= request.form("whatever")%>'>
>> >> >
>> >> >"ahmed" <basheer_ad@hotmail.com> wrote in message
>> >> >news:3d7c770b$1@10.1.10.29...
>> >> >>
>> >> >> hi all
>> >> >> I want to validate the form fields,but i don't want to use
>> >> >clientside validation.
>> >> >> Once the first form is submitted its should go to another form
>> >and
>> >> >check
>> >> >> for validation if the required values r not there then it should
>> >> >redirect
>> >> >> to previous form with values and display one error msg according
>to
>> >> >the missing
>> >> >> value.
>> >> >
>> >> >
>> >>
>> >
>> >
>>
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|