Stay me away from eval! Well, I don't see why, but I know the general
idea that it is bad.
function showProjectMenu(id) {
if (menusUnlocked == 'yes') {
Effect.BlindDown('project' + id);
lockMenus();
$('project' + id + '_link').onclick=function() { hideProjectMenu(id) }
$('project' + id + '_image').src = "/images/icons/folderOpen.gif";
setTimeout('unlockMenus()', 1000);
}
}
function hideProjectMenu(id) {
if (menusUnlocked == 'yes') {
Effect.BlindUp(id, {duration:0.25});
lockMenus();
$('project' + id + '_link').onclick=function() { changeProject(id) }
$('project' + id + '_image').src = "/images/icons/folderClosed.gif";
setTimeout('unlockMenus()', 250);
}
}
function lockMenus() {
menusUnlocked = 'no';
}
function unlockMenus() {
menusUnlocked = 'yes';
}
That will lock the entire interface for the duration of the animation,
only 1/4 second so its not a big deal.
Tom.
On 1/12/06, Ryan Gahl <[EMAIL PROTECTED]> wrote:
> Try the eval statement... might work...
>
> function lockMenu(menuId) {
> eval("var menu_" + menuId + " = true;");
> }
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs