Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 29th, 2006, 01:45 PM
Authorized User
 
Join Date: Feb 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Converting code to VBScript

Hi,

I have been trying to convert an ASP JavaScript to ASP VBScript, but encountered a statement I did not recognise or could decipher.


for ( var nOffset=0; nOffset<nColumns; nOffset++)
            {
               Out ( '<td valign="top">' );

                  if ( nIndex < nRecs )
                     Out ( (nIndex+1) + ': <a href="' + sArticles [ nIndex ] + ')</a>' );
                  else
                     Out ( '&nbsp;' );

                  nIndex += nRows;

               Out ( '</td>' );
            }



Can someone convert this to VBScript?
Thanks

 
Old July 29th, 2006, 07:02 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

For nOffset = 0 to nOffSet < nColumns
  nOffSet = nOffSet + 1
Next

Don't double post your threads just to get an answer.

"The one language all programmers understand is profanity."
 
Old July 30th, 2006, 07:28 AM
Authorized User
 
Join Date: Feb 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, I did what you said and it seems to work. But I still get errors when I try to run the script on my local host.

Can somebody take a look on the source code? I would appreciate it!

File: www.evergame.se/code_convert.rar

Columns.asp is the original file, and columns2.asp is the one I try to convert. Please help me out here, thanks!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting V.B.6 Code to V.B. 2005 - Help ! liamfitz Intro Programming 2 October 25th, 2006 06:30 PM
converting vbscript to asp willee ASP.NET 1.0 and 1.1 Basics 1 September 8th, 2006 07:36 AM
Converting V.B.6 Code to V.B. 2005 Code ? Help ! liamfitz BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 3 July 16th, 2006 08:39 PM
Converting asp code to com altaf Classic ASP Components 1 December 6th, 2004 01:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.