The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP Functional Testing / Mercury QuickTest Pro / QTP

prtester
Active Member


Reged: 05/09/06
Posts: 1059
Loc: Denver, CO
More fun with newbies: Arrays
      10/10/06 10:22 AM

Hi,

Still hammering away at this script project. I believe that I will need to use arrays. I don't entirely get Arrays, so I turned to my new book: "VBScript in a nutshell" for a new tack on the subject.

The book offers two examples, a static and a dynamic array, so like a good newbie, I copied them into a notebook file, made them into .html as clearly indicated and tried to run them. They won't run or as I've heard it said "that dog won't hunt." Not sure why.

I'm not getting any errors on the static array, it just doesn't display anything. My browser is IE 6.2

Here's the static array code (I'll post the dynamic array code next):

<HTML>
<HEAD>
<TITLE> Using the Array Function</TITLE>

</HEAD>
<BODY>
<SCRIPT LANGUAGE="VBScript" RUNAT = "Server">

Sub ShowArray()

Dim myArray

myArray = Array("Hello", "World", 2, 1)

Response.Write "Element 0: " & myArray(0) & "<BR>"
Response.Write "Element 1: " & myArray(1) & "<BR>"
Response.Write "Element 2: " & myArray(2) & "<BR>"
Response.Write "Element 3: " & myArray(3) & "<BR>"

End Sub

</SCRIPT>

<% ShowArray %>

</BODY>
</HTML>

--------------------
see my blog: www.sqablogs.com/rainbowtesting

Post Extras Print Post   Remind Me!     Notify Moderator


Entire topic
Subject Posted by Posted on
* More fun with newbies: Arrays prtester 10/10/06 10:22 AM
. * * QTP *DELETED* sr10   10/10/06 10:36 AM
. * * More fun with newbies: Arrays prtester   10/10/06 12:37 PM
. * * Re: More fun with newbies: Arrays SteveKay   10/10/06 11:52 PM
. * * Re: More fun with newbies: Arrays prtester   10/11/06 07:54 AM
. * * Re: More fun with newbies: Arrays prtester   10/10/06 10:25 AM

Extra information
0 registered and 68 anonymous users are browsing this forum.

Moderator:  IanFraser, Rajkumar_Rajangam, thorwath, TReddy, AJ, Tarun Lalwani, mwsrosso 



Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Thread views: 1902

Rate this thread

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5