Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object Question

Status
Not open for further replies.

rqmedes

Programmer
Jun 22, 2002
6
AU
HI all

I have a question

If i have a couple of objects
can i reference the objects using a string

eg some objects

var test1 = new tObject();
var test2 = new tObject();
var test3 = new tObject();

tObjects has some funstions
maybe testFunction()
a sting references the object i want to call
var tString = 'test2';

how do i call the testFunction from object set in tString

eg
something like
tString.testFunction();

any help would be appreciated

Regards


 
Take a look at this post thread216-1149691
It addresses calling functions based on values in an array.

Paranoid? ME?? WHO WANTS TO KNOW????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top