check for http?
am 08.07.2007 18:30:07 von Bam
Hey gang.
have a quick question, and I have searched for the answer, but maybe I am
not asking the correct question.
I have a form that a user submits their clan's website, and roster page.
What I want to do, is check to see if the field submitted contained
"http://" and if not, add it to the field submission.
I know i can make this easier, and put the http:// in the field as a default
value, but i want to know how to do this with a bit of form validation or
something.
not asking for how it is done, but maybe how to ask my question to get a
better search.
--
Thanks,
Bam
Re: check for http?
am 08.07.2007 23:04:49 von exjxw.hannivoort
Bam wrote on 08 jul 2007 in microsoft.public.inetserver.asp.general:
> Hey gang.
>
> have a quick question, and I have searched for the answer, but maybe I
> am not asking the correct question.
>
> I have a form that a user submits their clan's website, and roster
> page. What I want to do, is check to see if the field submitted
> contained "http://" and if not, add it to the field submission.
>
> I know i can make this easier, and put the http:// in the field as a
> default value, but i want to know how to do this with a bit of form
> validation or something.
>
> not asking for how it is done, but maybe how to ask my question to get
> a better search.
This is basic VisualBasicScript.
If you do not know this yourself,
you better first learn some scripting,
before you go on.
Search for a tutorial.
<%
f = UCase(request.form("myInputField"))
If Instr(f,"HTTP://")<>1 Then f = "http://" + f
%>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Re: check for http?
am 10.07.2007 09:42:32 von Anthony Jones
--
Anthony Jones - MVP ASP/ASP.NET
"Evertjan." wrote in message
news:Xns9967EAC9066D7eejj99@194.109.133.242...
> Bam wrote on 08 jul 2007 in microsoft.public.inetserver.asp.general:
>
> > Hey gang.
> >
> > have a quick question, and I have searched for the answer, but maybe I
> > am not asking the correct question.
> >
> > I have a form that a user submits their clan's website, and roster
> > page. What I want to do, is check to see if the field submitted
> > contained "http://" and if not, add it to the field submission.
> >
> > I know i can make this easier, and put the http:// in the field as a
> > default value, but i want to know how to do this with a bit of form
> > validation or something.
> >
> > not asking for how it is done, but maybe how to ask my question to get
> > a better search.
>
> This is basic VisualBasicScript.
> If you do not know this yourself,
> you better first learn some scripting,
> before you go on.
> Search for a tutorial.
>
What tutorial would you recommend?
Re: check for http?
am 10.07.2007 11:08:48 von exjxw.hannivoort
Anthony Jones wrote on 10 jul 2007 in
microsoft.public.inetserver.asp.general:
[please do not answer below your signature, Antony,
as intelligent newsreaders act on the "-- "]
[...]
>> This is basic VisualBasicScript.
>> If you do not know this yourself,
>> you better first learn some scripting,
>> before you go on.
>> Search for a tutorial.
>>
>
> What tutorial would you recommend?
>
I would not recomment one,
since [I hope] I am a bit beond using one,
so I advised searching for one.
returns 2,850,000 hits.
There must be one that fits the OP,
knowledge level and language wize.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Re: check for http?
am 10.07.2007 16:50:56 von Anthony Jones
"Evertjan." wrote in message
news:Xns9969716402347eejj99@194.109.133.242...
> Anthony Jones wrote on 10 jul 2007 in
> microsoft.public.inetserver.asp.general:
>
> [please do not answer below your signature, Antony,
> as intelligent newsreaders act on the "-- "]
>
Dumb news readers stick it at the top even though that's not where I want
it.
> [...]
> >> This is basic VisualBasicScript.
> >> If you do not know this yourself,
> >> you better first learn some scripting,
> >> before you go on.
> >> Search for a tutorial.
> >>
> >
> > What tutorial would you recommend?
> >
>
> I would not recomment one,
> since [I hope] I am a bit beond using one,
> so I advised searching for one.
>
>
>
> returns 2,850,000 hits.
>
> There must be one that fits the OP,
> knowledge level and language wize.
One of 2,850,000. So that's not very useful is it?
Here is a better response. Feel free to use it yourself the next time you
feel like telling a newbie off for being a newbie.
You can learn more about VBScript and it's use in ASP at:-
http://www.w3schools.com/vbscript/default.asp
and
http://www.w3schools.com/asp/default.asp
When you've followed these tutorials you can get more details here:-
http://msdn2.microsoft.com/en-us/library/sx7b3k7y.aspx
and this is also useful in ASP
http://msdn2.microsoft.com/en-us/library/ms524716.aspx
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
--
Anthony Jones - MVP ASP/ASP.NET