Click here to Skip to main content
15,913,361 members
Home / Discussions / Web Development
   

Web Development

 
GeneralSeeking Path Of Attack Pin
DallasTxRob26-Jun-02 21:25
DallasTxRob26-Jun-02 21:25 
GeneralRe: Seeking Path Of Attack Pin
Richard Deeming27-Jun-02 0:05
mveRichard Deeming27-Jun-02 0:05 
Generalreplace web address with text friendly text Pin
Garth26-Jun-02 14:08
Garth26-Jun-02 14:08 
GeneralRe: replace web address with text friendly text Pin
Richard Deeming27-Jun-02 0:15
mveRichard Deeming27-Jun-02 0:15 
GeneralWhats wrong with my code? HELP! Pin
Nnamdi Onyeyiri26-Jun-02 7:34
Nnamdi Onyeyiri26-Jun-02 7:34 
GeneralRe: Whats wrong with my code? HELP! Pin
Jeremy Falcon26-Jun-02 8:04
professionalJeremy Falcon26-Jun-02 8:04 
GeneralRe: Whats wrong with my code? HELP! Pin
Nnamdi Onyeyiri26-Jun-02 8:20
Nnamdi Onyeyiri26-Jun-02 8:20 
GeneralRe: Whats wrong with my code? HELP! Pin
Jeremy Falcon26-Jun-02 8:56
professionalJeremy Falcon26-Jun-02 8:56 
Hehe, I forgot to change to VB mode, but I figured it out when I noticed your return statements. I take it your coming from JScript, eh?

There is not a length property for an array object like in JScript. VB instead has two functions called LBound() and UBound() to find the lower and upper index bounds of the array.

Also, get rid of your return statements. To return a value you'll need to use a function and not a subroutine because subs don't return values by design. To return a value in VBScript and VB set the name of the function to the value just as you would a variable. To leave the function early you can call exit function.

Here's a short VB version of your function...
<%@ Language=VBScript %>
<%
Function GoodMsg(msg)
	Dim badwords, temp
	badwords = Array("arse", "a***hole")

	' test the text before removing characters.
	For i=0 To UBound(badwords)
		temp = InStr(msg, badwords(i))+1
		If temp > 1 Then
			GoodMsg = False
			Exit Function
		End If	
	Next
	' if we get here all went well
	GoodMsg = True
End Function
' test the messages
Response.Write GoodMsg("Nice arse.")
Response.Write GoodMsg("Nice booty.")
%>


Jeremy L. Falcon<nobr>
Homepage : Sonork = 100.16311

"But everybody darlin' sometimes bites the hand that feeds."
"Remember in this game we call life that no one said it's fair."
"Just because you're winnin' don't mean you're the lucky ones."
Song: Breakdown - Album: Use Your Illusion II - Artist: Guns N' Roses

GeneralRe: Whats wrong with my code? HELP! Pin
Nnamdi Onyeyiri26-Jun-02 9:21
Nnamdi Onyeyiri26-Jun-02 9:21 
GeneralRe: Whats wrong with my code? HELP! Pin
Nnamdi Onyeyiri26-Jun-02 9:36
Nnamdi Onyeyiri26-Jun-02 9:36 
GeneralWeb Form: Autocomplete combobox Pin
DFlatCSharp26-Jun-02 7:20
DFlatCSharp26-Jun-02 7:20 
GeneralRe: Web Form: Autocomplete combobox Pin
Chris Rickard26-Jun-02 7:57
Chris Rickard26-Jun-02 7:57 
GeneralRe: Web Form: Autocomplete combobox Pin
DFlatCSharp26-Jun-02 8:35
DFlatCSharp26-Jun-02 8:35 
GeneralRe: Web Form: Autocomplete combobox Pin
Chris Rickard26-Jun-02 8:40
Chris Rickard26-Jun-02 8:40 
GeneralRe: Web Form: Autocomplete combobox Pin
DFlatCSharp26-Jun-02 8:46
DFlatCSharp26-Jun-02 8:46 
GeneralRe: Web Form: Autocomplete combobox Pin
Chris Rickard26-Jun-02 12:09
Chris Rickard26-Jun-02 12:09 
GeneralRe: Web Form: Autocomplete combobox Pin
DFlatCSharp27-Jun-02 2:29
DFlatCSharp27-Jun-02 2:29 
GeneralRe: Web Form: Autocomplete combobox Pin
Chris Rickard27-Jun-02 4:35
Chris Rickard27-Jun-02 4:35 
Generalsearch a variable for a string Pin
Nnamdi Onyeyiri26-Jun-02 4:58
Nnamdi Onyeyiri26-Jun-02 4:58 
GeneralRe: search a variable for a string Pin
Wictor Wilén26-Jun-02 5:06
Wictor Wilén26-Jun-02 5:06 
GeneralRe: search a variable for a string Pin
Nnamdi Onyeyiri26-Jun-02 5:24
Nnamdi Onyeyiri26-Jun-02 5:24 
GeneralRe: search a variable for a string Pin
Wictor Wilén26-Jun-02 5:29
Wictor Wilén26-Jun-02 5:29 
GeneralRe: search a variable for a string Pin
Nnamdi Onyeyiri26-Jun-02 5:48
Nnamdi Onyeyiri26-Jun-02 5:48 
GeneralRe: search a variable for a string Pin
Nnamdi Onyeyiri26-Jun-02 5:48
Nnamdi Onyeyiri26-Jun-02 5:48 
Generalregex to strip HTML comments Pin
alex.barylski25-Jun-02 22:14
alex.barylski25-Jun-02 22:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.