Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 29th, 2006, 02:45 PM
Authorized User
 
Join Date: Feb 2004
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old July 29th, 2006, 08:02 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
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."
Reply With Quote
  #3 (permalink)  
Old July 30th, 2006, 08:28 AM
Authorized User
 
Join Date: Feb 2004
Location: , , .
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!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 07:30 PM
converting vbscript to asp willee ASP.NET 1.0 and 1.1 Basics 1 September 8th, 2006 08: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 09:39 PM
Converting asp code to com altaf Classic ASP Components 1 December 6th, 2004 01:35 AM



All times are GMT -4. The time now is 11:57 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.