Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > Visual Basic > VBScript

VBScript - Page 2

21-40 of 95     Previous     Next
Redirect User To Correct Login Page
by Maheshwar D.
If a user runs a page on our site and has not yet logged in, we can redirect him to the correct login page with the following script: ...
Pass Arrays ByVal From ASP Scripts to VB COM Objects
by Mark Kanter
In Microsoft Knowledge Base article Q217114, "How to: Implement Array Arguments in Visual Basic COM ...
Generating Random Numbers in Any Range
by Manoj K.
VBScript's random number generator, Rnd, only generates random numbers between 0 and 1. If you need numbers in a different range, use the following ...
Displaying Server Variables
by Deepak Pant
ServerVariables' collection of request objects provides vital information about the client browser, HTTP header, etc. During the development of a web application, we use various variables of this ...
Updating Multiple frames at Once
by Manoj K.
If you use frames in your page, it's easy enough to create a link that updates one of them. But what do you do when you need to update two or more frames at the same time? ...
Creating a For/Next Loop
by DevX Pro
I tried using the replace function as shown below, but I receive an error on using "Next i". Function formatOutput( theText ) Dim i Dim sNewString For i = 1 to Len(theText) If Mid(theText, i, 1) "’" Then sNewString = sNewString & Mid(theText, i, 1) End If Next i End Function The error reads: "Expected end of statement". If I take the i out, I receive a blank output which I'm assuming is because I've stopped the loop. What am I doing wrong? As soon as I can get this working I'd like to try assigning two single quotes as the value of an extra variable to replace all single quotes with two.
Return Date Parts With VBScript
by Kurt Cagle
Browsers Targeted: Internet Explorer ...
Calculate the Difference Between Dates With VBScript
by Kurt Cagle
Browsers Targeted: Internet Explorer ...
Create a Collapsible Tree in IE5 Using SrcElement
by Kurt Cagle
Browsers Targeted: Internet Explorer ...
Manipulate Dates With VBScript's DateAdd Function
by Kurt Cagle
Browsers Targeted: Internet Explorer ...
Drop the Parentheses in a VBScript Sub
by Ken Cox
Beginners are sometimes stymied when they get error messages on code that works perfectly elsewhere. For example, this code produces the error message, "Cannot use parentheses when calling a ...
Netscape Does Not Support VBScript
by DevX Pro
I recently rewrote my entire Web site using frames and VBScript to load the appropriate pages into the proper frame. My Web site looked fine in Internet Explorer, but in Netscape Navigator 4.5, it gave me "JavaScript" errors and the frames would not load the pages as they did in IE. Needless to say, it was necessary for me to rewrite the VBScript into JavaScript in order for the site to function properly. What did I do wrong? Why didn't the VBScript work in Netscape? Here is a sample of the VBScript I used: 'script used to load appropriate pages into frames when page loads Sub OnLoad() 'TOC is the Table of Contents frame parent.frames("TOC").location.href= "mainmenu.htm" End Sub
Display Currency Information Correctly
by DevX Pro
I am writing an online order form in ASP. How can I restrict the value of vartax to a two decimal digit (round up to two decimal points)? Most of the time vartax displays more than a 10 decimal digit. Here is a portion of my ASP code: '----- Following ------
Using Numbers in SQL Text
by DevX Pro
Here is the code I am using to do a query from an Access 97 database: Query = "SELECT * FROM DiamondList WHERE (ProductNumber = '" & tempProduct & "')" ProductNumber is the name of an Access 97 database field with the data type set to number. When I try running the script, I get this error message: Microsoft OLE DB Provider for ODBC Drivers error '80040e07' [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. Do I get this error because my field is set to a number (long integer) and my tempProduct variable is text? If so, how can I correct this problem?
Retrieve a Functional Reference Using GetRef in VBScript
by Kurt Cagle
Browsers Targeted: Internet Explorer ...
Display Graphics Using the colorDepth Property
by Kurt Cagle
Browsers Targeted: Internet Explorer ...
Finding Your Directory in IIS for the FileSystemObject
by Ken Cox
The FileSystemObject object (sic) in Active Server Pages (ASP) is very handy for reading, writing, and deleting files via server-side script. However, it isn't always easy to locate your files on ...
All Variables Must be Variants While Writing ASP code with VBScript
by Jai Bardhan
There are two limitation about writing ASP code with VBScript. First of all, all variables must be variants. Second, VBScript can currently retrieve output parameters only when they are declared as ...
Mark an ASP Page with a Transaction Support Property
by Jai Bardhan
You can mark an ASP page with a transaction support property, just as you can do with a registered MTS component. An ASP scripting object thus can serve either as the root object or as a secondary ...
Find the Path of a Project With ASP
by DevX Pro
Is there any way to programmatically determine the path of the current ASP page on the server? I am trying to access a specific text that I added to the server in a virtual directory and I don't have immediate access to the drive path.
21-40 of 95     Previous     Next
Sitemap