[Catalyst] Html::Proptotype

Jules Bean jules at jellybean.co.uk
Mon Nov 7 16:15:13 CET 2005


Will Smith wrote:
> I need to work on a drill-down hierarchy relationship like: Artist ->Cd->Title
> Can I within catalyst, use some module like Html::Prototype to do the onchange event when one select an Artist, the Cd , and Title fields will change without refreshing the page (or the worst case, refreshing the page - but this is not right). I am not sure that Html::Prototype could handle this. Someone has mentioned this few months ago, but there was no solution for it, so I just repeat  the question. 
>   

You'll have to write your own javascript, I think. It's not a hard one 
to write.

Bear in mind that if you want to do it entirely without any loading from 
the network, then of course your initial page will have to contain in 
some form (probably as a javascript variable but that's not the only way 
to do it) all the artists, cds and titles. That may make the page pretty 
big. Or it may not. It all depends how many you have :)

The most sophisticated way to do it would be using XMLHTTPRequest, then 
you would go and load from the server just the list of items (and 
javascript would populate the fields will all alternatives for you).

There are a bunch of good javascript books. I have McGrawHill-Osborne's 
"The Complete Reference: JavaScript 2nd Edition" by Powell and Schneider 
which is perfectly good. There are also more online tutorials than 
anyone could want, but it can be hard to locate the up-to-date ones from 
among the dross.

Jules



More information about the Catalyst mailing list