Use JQuery and then check out the documentation on binding an event.
A classic example is passing the id to a function to identify that element
inside of the function:
$("#TheButton").bind("click",function(el){openClose( $(this).attr("id") )});
function openClose(el){
if($(el).is(".closed")){
$(el).show();
$(el).addClass("open");
}
if($(el).is(".open"){
$(el).hide();
$(el).addClass("closed");
}
}
Make sense?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323650
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4