[thelist] Coldfusion: getting javascript variables

ted serbinski tss24 at cornell.edu
Tue Jan 8 19:24:38 CST 2002


> how is this array being created in the first place?
>

The array is being created dynamically, which further complicates
things. If you follow this link:
http://www.people.cornell.edu/pages/tss24/menu.html (works best in ie4+
right now)

You will see this menu manager I'm developing. It's a visual way to see
your menu layout, and how sublinks are related to parent links and ect.
Once you get your layout correctly, I want to this data to a cold fusion
script which generates the html code. 

Now I'm not using normal arrays, but rather structure type arrays in
javascript:

data['item1Name']= 'item 1';
data['item1Action']= 'http://www.yourLink.com';
data['item1X']= 100; 

Each item has the above information, denoting its name, where it goes,
and the type of link it is based on its X coordinate (100 for main link,
115 for sub link, 130 for sub-sub link).

What I planned on doing was recreating this array in a coldfusion
struct, where I would write a loop script that would list only the main
links (ie, links where X=100). If you click on a link, it would then
reload the page displaying sublinks for that value (based on loop
through all items and figuring out what ones are 115 after the first 100
and before the next 130 or 100 link).

Is there a better way to do this? I am thinking probably so but am also
rushing to get this done by tomorrow morning.

Thanks again

ted






More information about the thelist mailing list