473,396 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

check for http?

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
Jul 8 '07 #1
4 1547
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)
Jul 8 '07 #2


--
Anthony Jones - MVP ASP/ASP.NET
"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@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?

Jul 10 '07 #3
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.

<http://www.google.com/search?q=vbscript tutorial>

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)
Jul 10 '07 #4


"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@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.

<http://www.google.com/search?q=vbscript tutorial>

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
Jul 10 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: vishal | last post by:
how can i verify the email address entered by client??? is there any readily available function for that in php or mysql????? else suggest me some links for verifying email address enetered...
0
by: Alex82 | last post by:
I can't use it....for example i have to create a column that accept values between 1 to 120...i can't enumerate all of them....or i have to accept a value different from NULL if an other column has...
10
by: Clive Backham | last post by:
I tried posting this on comp.infosystems.www.misc, but that group appears to get very little traffic. So now I'm trying here. If there is a more appropriate group, please let me know. I'm...
5
by: Steve Wylie | last post by:
I am constructing an HTML questionnaire and one of the questions requires people to rate some choices from 1 to 5, where 1 is their favourite and 5 is their least favourite: Car Bus Taxi cab...
7
by: Neil | last post by:
I have a check box on a form that's bound to a function that returns a True/False value. When the user clicks on the check box, I run some code through the MouseDown event. Everything works fine. ...
6
by: Peter Dunker | last post by:
Hello, I think I have a newbee question. If I create a char pointer at the beginning of function and use it only in a special case: char *name; if (a = 1)
2
by: Nuno Magalhaes | last post by:
How to check for a closed http socket without losing any data? (MSDN says to send something to server). Somewhere in my code (after sending the http header in plain text) I'm doing a loop with:...
14
by: Ørjan Langbakk | last post by:
I have a form where the user has the possibility to enclose his name. email, address and phonenumber. I want to be able to check if some of the fields are filled - at least one. This is so that...
2
by: AdawayNoSpam | last post by:
Said that I have the following class Class MyRootClass(Of T) End Class Class MySubClass1(Of T) Inherits MyRootClass(Of T) End Class
10
by: Dieter Pelz | last post by:
Hallo, what is the best way to check the installation of mfc80 and vcrt sidebyside assemblies? Best Regards, Dieter Pelz
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.