i think u guys are assuming firefox, in IE eval without the function wrapped in () does not cause syntax err, and even if i added the '()', like
var stuff7=eval('(function() {alert("stuff..");})') stuff7 is still undefined........according to IE8 beta2's js console that is..... On Dec 3, 9:36 pm, "yuval dagan" <[EMAIL PROTECTED]> wrote: > try it like this: > add "(" and ")" > var stuff7=eval('(function() {alert("stuff..");})') > > thats because the interpreter rules of running the script > > On Thu, Dec 4, 2008 at 3:17 AM, yoshi <[EMAIL PROTECTED]> wrote: > > > heres my js: > > > var stuff7=eval('function() {alert("stuff..");}') > > > when i alert stuff7 it is undefined. > > > now if i do this: > > eval('var stuff7=function() {alert("stuff..");}') > > > and alert stuff7, it is defined > > > does anybody know y, the jscript eval doc doesnt really help, i > > suspect it is a scope issue? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---