Hi all. I'm using that one to loop through a <Select> listbox on a web page, and adding each line or entry from this listbox into an array. A string's then created of all the array elements before showing this in a messagebox.Code:Function CreateInitialArray() { var intCounter; var strTemp; for(intCounter=0; intCounter<theform.lstbox.options.length; intCounter++) { strAry[intCounter] = theform.lstbox.options[intCounter].text; strTemp = strTemp + strAry[intCounter] + "\n"; } alert(strTemp); }
I keep getting "undefined" before the first entry though - below is an example of how this comes out. Whats the reasoning behind this please ?!?!?:
Code:UndefinedOne Two Three




:
Reply With Quote