Skip to main content

Thread: javascript array enquiry


a tiny bit of background:

have 2 arrays - 1 parent , 1 child, if will.

child subset of parent.

parent array:
code:
parent=new array() parent[0]=image1; parent[1]=image2; parent[2]=image3; parent[3]=image4; parent[4]=image5; parent[5]=image6;
child array:
code:
child=new array() child[0]=parent[0]; child[1]=parent[3]; child[2]=parent[4];
each image "value" (in parent array) has unique parameters - e.g. horizontal vs. vertical orientation - address in third array. when images selected - web-based thumbnail gallery (which made of parent or child subset of images) - (larger) image displayed proper positioning , orientation.

the central issue:

searching way access index number of parent "value" within child array - i.e. "3" within parent[3] - number keyed formatting characteristics (of image4, example) defined within 3rd array.

suggestions.

store id image , use id lookup in third array. or better, store information of third array image third array no longer needed.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] javascript array enquiry


Ubuntu

Comments

Popular posts from this blog

Joomla 3.3 Installation Error message - Joomla! Forum - community, help and support

Multilanguage infinite redirect loop error. - Joomla! Forum - community, help and support

trim media limit reached