Valhalla Legends Forums Archive | Web Development | VBScript

AuthorMessageTime
Mangix
how does one rig it so that when i make a field, the user types in lets say DotA, then it would redirect him to a page? im no real expert on HTML VBScript but here goes. [code]Sub i dunno which
If Field = DotA Then
Redirect somewhere
ElseIf Field = Warcraft Then
Redirect Elsewhere
Else
Redirect Elsewhere too.[/code] so how would i do this?
March 14, 2005, 5:45 AM
R.a.B.B.i.T
<meta http-equiv="refresh" content="X;Y">

X = delay in seconds
Y = URL

IE:
<meta http-equiv="refresh" content="5;http://www.google.com/search?q=DotA">

--
[edit]
That's HTML, btw, so you'd use Document.Write (I guess).
March 14, 2005, 11:21 PM
peofeoknight
I am assuming this is for asp classic and this is not a client side implementation of vbscript.

[code]
<form action="takeme.asp" method="post">
<input type="text" name="pagename" size="20">
<input type="submit" value="submit">
</form>
<%
dim pagename
pagename=request.form("pagename")
if pagename<>"" then
      response.redirect(pagename)
end If
%>
[/code]
name this file takeme.asp and then type http://google.com into your input and wahlah you are there.
March 15, 2005, 12:54 AM
Mangix
ummm cant i put in a code similar to this in a .html file?
March 20, 2005, 4:39 AM
peofeoknight
yes... except that client side vbscript is not well supported. You should not use javascript for functional scripting, that is with 10% of the internet not supporting it. Do you know the numbers for client side vbscript? I would be willing to bet that far more than 10% of the internet does not support it. It makes no sense for anyone to use client side vbscript. That is why I figured you wanted the server side implementation.
March 20, 2005, 5:37 AM
Mangix
...

i just want to put an almost blank page on the home of my website and it would have text saying Choose your Destination. then there would be a field below saying where to go to. and thats where i need VBScript cause i saw a site that had this ability with VBScript. i dunno how to do it in HTML cause i dunno the functions for VBScript in HTML. for Stealthbot those are easy.
March 20, 2005, 6:45 AM
peofeoknight
[quote author=Mangix link=topic=10919.msg104645#msg104645 date=1111301137]
...

i just want to put an almost blank page on the home of my website and it would have text saying Choose your Destination. then there would be a field below saying where to go to. and thats where i need VBScript cause i saw a site that had this ability with VBScript. i dunno how to do it in HTML cause i dunno the functions for VBScript in HTML. for Stealthbot those are easy.
[/quote] The best option would be server side, like I posted above. If you want to do it client side you should do it with javascript, the support would be better. But like I said, if this is going to be something important it must be done server side, otherwise your site will fail for a certain % of your users.
March 21, 2005, 6:37 AM
St0rm.iD
You want a dropdown, or a textfield?


Also...I thought you were a "VBScript/HTML" expert? :)

Don't bother using VBScript. It's old, outdated, and unsupported, even when used server-side.
March 21, 2005, 5:42 PM
peofeoknight
[quote author=Banana fanna fo fanna link=topic=10919.msg104791#msg104791 date=1111426964]
You want a dropdown, or a textfield?


Also...I thought you were a "VBScript/HTML" expert? :)

Don't bother using VBScript. It's old, outdated, and unsupported, even when used server-side.
[/quote] I would not call vbscript unsupported when used server side, but outdated yes. It's all about teh .net now.
March 21, 2005, 9:11 PM
Null
[quote author=Mangix link=topic=10919.msg104922#msg104922 date=1111482208]
i am an expert Stealthbot VBScript. Recognize Bitch. anyways thx. ima find some Javascript tutorial and work with that.

oh and the reason i dont know HTML VBScript is cause i dunno any of its functions. for stealthbot i know about all of them.
[/quote]

HOLY SHIT!, My life is now complete, i have found the most funniest, stupidest comment/post what ever, of all time.

I couldnt of made one up better if i tried.........
March 22, 2005, 1:28 PM
Mangix
ROFL. you thought that was sooooooo funny that you put it in your sig lmao. [code]Function Laid(User)
If user = you Then document.write ('/kick ' & User)[/code]
March 23, 2005, 12:22 AM
KkBlazekK
Wow, you have no idea what your doing. You didn't even end the function!
March 23, 2005, 2:36 AM
Null
[quote author=Mangix link=topic=10919.msg105027#msg105027 date=1111537353]
ROFL. you thought that was sooooooo funny that you put it in your sig lmao. [code]Function Laid(User)
If user = you Then document.write ('/kick ' & User)[/code]
[/quote]

Hmm i see, your trying to rival your other outrageously stupid post, sorry, i just dont have enought space below to qoute them all.
March 23, 2005, 4:59 AM
peofeoknight
[quote author=Blaze link=topic=10919.msg105041#msg105041 date=1111545388]
Wow, you have no idea what your doing. You didn't even end the function!
[/quote] Not to mention the if statement.
March 23, 2005, 6:56 AM
Mangix
ummmmmmmm no. quasi = WRONG. if the If statement is one line only, there is no need for End If. ask JoeTheOdd if you dont believe me. also i know i didnt end the function. i was in a hurry at the time.
March 23, 2005, 11:00 PM
Myndfyr
[quote author=Mangix link=topic=10919.msg104922#msg104922 date=1111482208]
i am an expert Stealthbot VBScript. Recognize Bitch. anyways thx. ima find some Javascript tutorial and work with that.

oh and the reason i dont know HTML VBScript is cause i dunno any of its functions. for stealthbot i know about all of them.
[/quote]

He's such an expert that he's been put on moderator review @ stealthbot.net because of his idiotic posts.

[quote author=Mangix link=topic=10919.msg105189#msg105189 date=1111618800]
ummmmmmmm no. quasi = WRONG. if the If statement is one line only, there is no need for End If. ask JoeTheOdd if you dont believe me. also i know i didnt end the function. i was in a hurry at the time.
[/quote]
No, that's incorrect.  Visual Basic requires an End If statement because it doesn't know the difference between a one-line and multi-line "If" block because it has no cue for a start of the block, as C-based languages do.  Consider the following two snippets of code:

[code]
' code snippet 1
If user = Nothing Then
    nullUsers = nullUsers + 1
End If

MsgBox "Number of null users: " & nullUsers

'code snippet 2
If user = Nothing Then
  nullUsers = nullUsers + 1
MsgBox "Number of null users: " & nullUsers
[/code]

The first would compile (or execute).  The second would not.  Why?  The second doesn't know if the MsgBox statement belongs to the If user = Nothing clause block or not.  If it does, then there should be an End If according to your logic.  If it does not belong, then they work correctly.  But in the former case, where does the End If statement go?  Does it go before MsgBox, which would make the code snippets behave the same?  Or does it go *after* MsgBox, which would make the code snippets behave differently (the message box would only display if user = Nothing in the second snippet).

This is different than C-based languages.  Consider this:
[code]
// snippet 1
if (user == NULL)
  nullUsers ++;
cout << "Number of null users: " << nullUsers << std::endl;

// snippet 2
if (user == NULL)
{
  nullUsers ++;
  cout << "Number of null users: " << nullUsers << std::endl;
}
[/code]
The opening bracket gives the compiler the clue that it needs to determine if the if statement is a single-statement or multi-statement block.
March 24, 2005, 2:01 AM
Newby
[quote author=MyndFyre link=topic=10919.msg105236#msg105236 date=1111629705]
[quote author=Mangix link=topic=10919.msg105189#msg105189 date=1111618800]
ummmmmmmm no. quasi = WRONG. if the If statement is one line only, there is no need for End If. ask JoeTheOdd if you dont believe me. also i know i didnt end the function. i was in a hurry at the time.
[/quote]
No, that's incorrect.  Visual Basic requires an End If statement because it doesn't know the difference between a one-line and multi-line "If" block because it has no cue for a start of the block, as C-based languages do.  Consider the following two snippets of code:

[code]
' code snippet 1
[...]
If user = Nothing Then
  nullUsers = nullUsers + 1
[...]
[/code]
[/quote]

Actually, one-line "If" statements can all be on one line. At least they could last time I checked.

See the following:

[code]
If user = Nothing Then nullUsers = nullUsers + 1
[/code]
March 24, 2005, 3:02 AM
Adron
[quote author=MyndFyre link=topic=10919.msg105236#msg105236 date=1111629705]
No, that's incorrect.  Visual Basic requires an End If statement because it doesn't know the difference between a one-line and multi-line "If" block because it has no cue for a start of the block, as C-based languages do.
[/quote]

As others have said, Visual Basic supports one-line "If" statements just fine. What you may also want to know is that Visual Basic is even more powerful than C++:  You can have multiple statements in a one-line "If"!

[code]
'code snippet 3
If user = Nothing Then nullUsers = nullUsers + 1
MsgBox "Number of null users: " & nullUsers
[/code]

and then:

[code]
'code snippet 4
If user = Nothing Then nullUsers = nullUsers + 1: MsgBox "Found another null user!"
MsgBox "Number of null users: " & nullUsers
[/code]


March 24, 2005, 3:18 AM
Myndfyr
Oh LoL -- here it never occurred to me that you can just avoid a line break.  :P
March 24, 2005, 4:19 AM
KkBlazekK
Can you do single line if statements in vb.net?

@Mangix: Your such a pro you ask others about the basics of the language your an expert at. Bravo.
March 24, 2005, 4:43 AM
Mangix
[quote author=MyndFyre link=topic=10919.msg105236#msg105236 date=1111629705]
He's such an expert that he's been put on moderator review @ stealthbot.net because of his idiotic posts.[/quote] No. its because you are an abusive mod. all i did was ask FrOzeN to use the JavaScript console so he could see if any errors occured. because of that, you warned me and put me on mod review. also im your PM you said that i cant post for 4 days. 4 days have passed. And most of them are because of that Nigga Imhotep. he placed 4 warns on me for posting in the same topic. and the others because i started posting stupid shit in technical support(which i dont do now).
March 25, 2005, 2:24 AM
Adron
[quote author=Mangix link=topic=10919.msg105423#msg105423 date=1111717483]
[quote author=MyndFyre link=topic=10919.msg105236#msg105236 date=1111629705]
He's such an expert that he's been put on moderator review @ stealthbot.net because of his idiotic posts.[/quote] No. its because you are an abusive mod. all i did was ask FrOzeN to use the JavaScript console so he could see if any errors occured. because of that, you warned me and put me on mod review. also im your PM you said that i cant post for 4 days. 4 days have passed. And most of them are because of that Nigga Imhotep. he placed 4 warns on me for posting in the same topic. and the others because i started posting stupid shit in technical support(which i dont do now).
[/quote]

*places warning onto Mangix*
March 25, 2005, 2:32 AM
Mangix
i cant see my warns. where are they?
March 25, 2005, 2:45 AM
Newby
Right above your post.
March 25, 2005, 2:46 AM
Mangix
i cant see it. gimme a hint :P.
March 25, 2005, 2:49 AM
St0rm.iD
[quote author=Mangix link=topic=10919.msg105433#msg105433 date=1111718957]
i cant see it. gimme a hint :P.
[/quote]

wow.
March 25, 2005, 3:10 AM
Myndfyr
[quote author=Mangix link=topic=10919.msg105423#msg105423 date=1111717483]
[quote author=MyndFyre link=topic=10919.msg105236#msg105236 date=1111629705]
He's such an expert that he's been put on moderator review @ stealthbot.net because of his idiotic posts.[/quote] No. its because you are an abusive mod. all i did was ask FrOzeN to use the JavaScript console so he could see if any errors occured. because of that, you warned me and put me on mod review. also im your PM you said that i cant post for 4 days. 4 days have passed. And most of them are because of that Nigga Imhotep. he placed 4 warns on me for posting in the same topic. and the others because i started posting stupid shit in technical support(which i dont do now).
[/quote]

Well maybe you should stop posting idiotic things?
March 25, 2005, 4:22 AM
Mangix
believe me i have. read my new posts :P.
March 25, 2005, 4:59 AM
peofeoknight
[quote author=Mangix link=topic=10919.msg105189#msg105189 date=1111618800]
if the If statement is one line only, there is no need for End If
[/quote] I remember now... it has just been so long since I have been sloppy and put all my code on one line. I usually have my code on several lines, indent, and even comment my code  ::)
March 25, 2005, 9:32 PM
Mangix
[quote author=Blaze link=topic=10919.msg105264#msg105264 date=1111639406]
Can you do single line if statements in vb.net?

@Mangix: Your such a pro you ask others about the basics of the language your an expert at. Bravo.
[/quote] gimme all the functions of HTML and ill do it. i only know the functions for Stealthbot.
March 26, 2005, 12:25 AM
St0rm.iD
There are no "functions of HTML". Perhaps you're looking for a) DOM API b) ASP API c) ASP.NET API
March 26, 2005, 5:23 AM
KkBlazekK
[quote author=quasi-modo link=topic=10919.msg105576#msg105576 date=1111786357]
I remember now... it has just been so long since I have been sloppy and put all my code on one line. I usually have my code on several lines, indent, and even comment my code ::)
[/quote] I know what you mean but a simple[code] If len(Message) = 0 Then Exit Sub[/code] is efficient and very easy to read still.
March 26, 2005, 7:18 PM
JoeTheOdd
Please excuseme bringing up this rather oldish topic but...

[quote author=Magnix's Title]VBScript/HTML Expert[/quote]

I *truely* hope he can handle this.
April 6, 2005, 3:03 AM
Mangix
handle what? also someone gimme all the docoment.write and .ReadURL stuff.
April 6, 2005, 1:49 PM
JoeTheOdd
.....

<script language="JavaScript">
    document.Write("Go learn VB before calling yourself an expert, is what I meant.");
</script>
April 6, 2005, 8:14 PM
Mangix
VB sucks. go C++. anyways do you know any of the user document. functions besides write?
April 7, 2005, 12:16 AM
St0rm.iD
[quote author=Mangix link=topic=10919.msg107699#msg107699 date=1112832961]
VB sucks. go C++. anyways do you know any of the user document. functions besides write?
[/quote]

Why?
April 7, 2005, 1:43 AM
Myndfyr
[quote author=Mangix link=topic=10919.msg107699#msg107699 date=1112832961]
VB sucks. go C++. anyways do you know any of the user document. functions besides write?
[/quote]

noob.  It's called searching.
April 7, 2005, 1:53 AM
Mangix
thats badly referenced. it should be in the JS/VBScript section :P.
April 7, 2005, 6:41 AM

Search