[Proto-Scripty] Re: using eval inside Ajax Request

2008-11-15 Thread kangax
On Nov 15, 10:26 pm, Namotco [EMAIL PROTECTED] wrote: I was trying to demonstrate my problem, it's not what's actually in my code.  It's seems that $('test') inside my eval is not the same as the $('test') outside of it.  When I try to run that code I'd expect $ ('test')'s HTML to change, but

[Proto-Scripty] Re: using eval inside Ajax Request

2008-11-14 Thread kangax
On Nov 14, 7:03 pm, Namotco [EMAIL PROTECTED] wrote: Sorry, should be: eval(someVar=function() {     this.elm=$('outputs');    }; s=new someVar(); s.innerHTML='test';); Omitting `var` is generally a bad idea. Either use `var` or assign to a property directly (as in `window.foo = 'bar'`);

[Proto-Scripty] Re: using eval inside Ajax Request

2008-11-12 Thread kangax
On Nov 12, 4:37 pm, Namotco [EMAIL PROTECTED] wrote: Maybe this evals, but the functions do not get exposed.  How should I be doing this? function reCalc() {         var sendSymsN = new Ajax.Request(url, {method:'post', onSuccess: function() {                                 var