Hi
I'm new to the programming world and I've been trying to convert some javascript to vbscript.

This is the javascript code below
var full_array = rs.GetRows().toArray()
var length = 6
for(var i =0 ;i < full_array.length; Step
i= i + length)
menuItemsArray[parseFloat( full_array[i] )] =
new menuItem(
parseFloat( full_array[i] ),
String( full_array[i+1] ),
parseFloat( full_array[i+2] ),
String( full_array[i+3] ),
parseInt( full_array[i+4] ),
Boolean( full_array[i+5] )
)
}
rs.close()

// STEP 6: Link pages togeather
current_page = menuItemsArray[ parseFloat(current) ]
//current_page.hidden = current_page
var key = null
for (key in menuItemsArray) {
if(menuItemsArray[menuItemsArray[key].parent])
menuItemsArray[menuItemsArray[key].parent].add(menuItemsArray[key])
}

-------------------------------------------------------------------------
and this is what i have come up with

Dim full_array, length, current_page, key

full_array = rs.GetRows().toArray()
length = 6
for i =0 to i < full_array.length step i= i + length
menuItemsArray(CDbl(full_array(i))) = _
menuItem(CDbl( full_array(i) ), String( full_array(i+1) ), CDbl( full_array(i+2) ), String( full_array(i+3) ), CDbl( full_array(i+4) ), CBool( full_array(i+5) ))

'STEP 6: Link pages togeather
current_page = menuItemsArray( parseFloat(current) )
'current_page.hidden = current_page
key = null
for each key in menuItemsArray
if(menuItemsArray(menuItemsArray(key).parent)) then
menuItemsArray(menuItemsArray(key).parent).add(menuItemsArray(key))


I'm not sure if i have made all the right changes as i get weird error messages on code further down the page that works when this caode isn't on the page.

Any help would be much appreciated