I'm pretty new to Javascript (PHP is my specialty), is there a way to
make 'variable variables'  (
http://nz.php.net/manual/en/language.variables.variable.php ). Say I
have this function:

function lockMenu(menuId) {
    var menu_*menuId* = true;
}

If I ran lockMenu('myAccount'), I'd like the variable menu_myAccount
set to false. How would I go about this?

Tom.

On 1/12/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote:
> I think there's a way to check if an effect is running, but am not
> 100% on what it is exactly.
>
> The effect does have a state var that should be set to 'finished' when
> it's done, but there is no method to check for that, so I'm not sure
> if it's recommended to use or not.
>
> if you do var e = new Effect...
> then you could try doing...
> if (e.state == 'finished') or something similar... again, not sure if
> this is recommened or not.
>
> On 1/11/06, Gregory Hill <[EMAIL PROTECTED]> wrote:
> > Generally I just keep track of whether it's open or not in a variable
> > and check that variable before creating a new animation.  So, only do
> > the animation if the menu isn't open.
> >
> > Greg
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > [mailto:rails-spinoffs-
> > > [EMAIL PROTECTED] On Behalf Of Tom ...
> > > Sent: Wednesday, January 11, 2006 4:21 AM
> > > To: rails-spinoffs@lists.rubyonrails.org
> > > Subject: [Rails-spinoffs] [scriptaculous] Intermitently Disabling
> > Clicks
> > >
> > > I have button that slides down a menu using Effect.BlindDown, but the
> > > function that slides it down also makes it so that the opening link
> > > now slides the menu back in.
> > >
> > > If the user double clicks the link (thuse opening & closing
> > > immediatley) the slide animation breaks, then will not extend
> > > correctly (but no JS errors). How would you go about stopping this
> > > happening?
> > >
> > > Also, is it just me or is the wiki down more often that not?
> > >
> > > Tom Rix.
> > > _______________________________________________
> > > Rails-spinoffs mailing list
> > > Rails-spinoffs@lists.rubyonrails.org
> > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> > _______________________________________________
> > Rails-spinoffs mailing list
> > Rails-spinoffs@lists.rubyonrails.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> >
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to