Randell D. wrote:
> Randy Webb wrote:
>
> > Robert wrote:
> >
> >> VK wrote:
> >>
> >>>> Are you saying it is not valid JavaScript?
> >>>
> >>>
> >>>
> >>>
> >>> *Roughly* that.
> >>>
> >>> As such Function will be evaluated on each call, it's performance is
> >>> lower than with standard function(). So it's suggested to use it only
> >>> if you really need to create run-time functions from the scratch.
> >>
> >>
> >>
> >> Yes, that is exactly what he asked for.
> >> name -> function call
> >> It could not have been done using a literal function to my knowledge.
> >>
> >> Anyway,
> >> eval(name+"()")
> >> is a better solution.
> >
> >
> > NO.
> >
> > window[name+'()']
> >
> > is a better solution.
> >
>
> This use of the window object (method?) I like... I'm going to play
> around with it...
>
> And with regards to eval - My experience thus far has been to avoid
> using eval where possible because of its overheads... but excusing the
> performance weight, its simple, and functional...
>
Eval keeps it simple! (K.I.S.S.)
http://www.askblax.com
> Thanks,
> randelld
Received on Tue Oct 18 02:57:11 2005