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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get data from array 1

Status
Not open for further replies.

dle46163

IS-IT--Management
Jul 9, 2004
81
US
I had this working then broke it! Here is the code:

// My function
function slide_set_time(slide_set_name,run_hour){
this.slide_set_name = slide_set_name;
this.run_hour = run_hour;
}

// My Array
window.slide_schedule_array = new Array();
var ni = 0;
window.slide_schedule_array[ni++] = new slide_set_time('slide_set1','02');


All I need to do is grab the data in the nested array in the first position. In this case that equals slide_set1. Though, I cant' seem to get the syntax right. Right now I'm just trying to alert the result to the screen. Any help would be awesome!


 
Right now I'm just trying to alert the result to the screen.
This should do it:
Code:
alert(slide_schedule_array[0].slide_set_name);

-kaht

[small](All puppies have now found loving homes, thanks for all who showed interest)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top