Hi all,
I use the ajax updater with evalscripts=true.
When I load HTML with included <script> tags, I get this error in Opera
8.51:
------------------- snip -----------------------------
http://ccml.uni-weimar.de/
Timeout thread: delay 10 ms
Error:
name: EvalError
message: Statement on line 258: Illegal use of eval
Backtrace:
Line 258 of linked script http://ccml.uni-weimar.de/javascripts/prototype.js
results.push(iterator(value, index));
Line 227 of linked script http://ccml.uni-weimar.de/javascripts/prototype.js
iterator(value, index++);
Line 417 of linked script http://ccml.uni-weimar.de/javascripts/prototype.js
iterator(this[i]);
Line 231 of linked script http://ccml.uni-weimar.de/javascripts/prototype.js
this._each(function (value)
{
try
{
iterator(value, index++);
}
catch (e)
{
if (e != $continue)
throw e;
}
}
);
Line 259 of linked script http://ccml.uni-weimar.de/javascripts/prototype.js
this.each(function (value,index)
{
results.push(iterator(value, index));
}
);
Line 160 of linked script http://ccml.uni-weimar.de/javascripts/prototype.js
return this.extractScripts().map(eval);
Line 1035 of linked script http://ccml.uni-weimar.de/javascripts/prototype.js
content.evalScripts();
At unknown location
[statement source code not available]
------------------- snip -----------------------------
I changed the evalscripts function to this:
evalScripts: function() {
ex=this.extractScripts();
for(x=0;x<ex.length;x++) {
eval(ex[x]);
}
},
and now it works. Hmm...
__________________________________________________________________________
Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach!
Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131
> Hi all, > I use the ajax updater with evalscripts=true. > When I load HTML with included <script> tags, I get this error in > Opera 8.51: > > > ------------------- snip ----------------------------- > > http://ccml.uni-weimar.de/ > Timeout thread: delay 10 ms > Error: > name: EvalError > message: Statement on line 258: Illegal use of eval > Backtrace: > Line 258 of linked script http://ccml.uni-weimar.de/javascripts/ > prototype.js > results.push(iterator(value, index)); > Line 227 of linked script http://ccml.uni-weimar.de/javascripts/ > prototype.js > iterator(value, index++); > Line 417 of linked script http://ccml.uni-weimar.de/javascripts/ > prototype.js > iterator(this[i]); > Line 231 of linked script http://ccml.uni-weimar.de/javascripts/ > prototype.js > this._each(function (value) > { > try > { > iterator(value, index++); > } > catch (e) > { > if (e != $continue) > throw e; > } > } > ); > Line 259 of linked script http://ccml.uni-weimar.de/javascripts/ > prototype.js > this.each(function (value,index) > { > results.push(iterator(value, index)); > } > ); > Line 160 of linked script http://ccml.uni-weimar.de/javascripts/ > prototype.js > return this.extractScripts().map(eval); > Line 1035 of linked script http://ccml.uni-weimar.de/javascripts/ > prototype.js > content.evalScripts(); > At unknown location > [statement source code not available] > ------------------- snip ----------------------------- > > > I changed the evalscripts function to this: > evalScripts: function() { > ex=this.extractScripts(); > for(x=0;x<ex.length;x++) { > eval(ex[x]); > } > }, > > and now it works. Hmm...I had the same problem with Safari and Firefox. I am using the version of prototype included with scriptaculous 1.5. The scripts in my HTML fragment would not be executed properly in Safari and Firefox would crash with a bus error (on Linux as well as on the Mac). Your fix worked for me. Thanks! Tom _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hmm... I had firefox crashing on me, but it fixed when I took out any
declarations in my code that had a "var" in them.
So while this used to work for me:
var blah = ''fdsaf'';
Now that makes firefox crash, so I changed it to this:
blah = ''fdaf'';
and that worked fine.
I''ll try your fix and see if I can go back to my old code. Thanks,
rahul
________________________________
From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]
On Behalf Of Tom
Riley
Sent: Monday, December 19, 2005 9:44 AM
To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Subject: [Rails-spinoffs] Re: possible opera+prototype bug in
evalscripts?
Hi all,
I use the ajax updater with evalscripts=true.
When I load HTML with included <script> tags, I get this error
in Opera 8.51:
------------------- snip -----------------------------
http://ccml.uni-weimar.de/ <http://ccml.uni-weimar.de/>
Timeout thread: delay 10 ms
Error:
name: EvalError
message: Statement on line 258: Illegal use of eval
Backtrace:
Line 258 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
results.push(iterator(value, index));
Line 227 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
iterator(value, index++);
Line 417 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
iterator(this[i]);
Line 231 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
this._each(function (value)
{
try
{
iterator(value, index++);
}
catch (e)
{
if (e != $continue)
throw e;
}
}
);
Line 259 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
this.each(function (value,index)
{
results.push(iterator(value, index));
}
);
Line 160 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
return this.extractScripts().map(eval);
Line 1035 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
content.evalScripts();
At unknown location
[statement source code not available]
------------------- snip -----------------------------
I changed the evalscripts function to this:
evalScripts: function() {
ex=this.extractScripts();
for(x=0;x<ex.length;x++) {
eval(ex[x]);
}
},
and now it works. Hmm...
I had the same problem with Safari and Firefox. I am using the version
of prototype included with scriptaculous 1.5. The scripts in my HTML
fragment would not be executed properly in Safari and Firefox would
crash with a bus error (on Linux as well as on the Mac). Your fix worked
for me. Thanks!
Tom
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Yeah I was thinking about that - I had ''undeclared variable'' errors in Safari for variables I had declared outside of any function. Tom On 19 Dec 2005, at 14:55, Rahul Bhargava wrote:> > > Hmm… I had firefox crashing on me, but it fixed when I took out any > declarations in my code that had a “var” in them. > > So while this used to work for me: > > var blah = ‘fdsaf’; > > Now that makes firefox crash, so I changed it to this: > > blah = ‘fdaf’; > > and that worked fine. > > > > I’ll try your fix and see if I can go back to my old code. Thanks, > > > > rahul > > > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails- > spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Tom Riley > Sent: Monday, December 19, 2005 9:44 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] Re: possible opera+prototype bug in > evalscripts? > > > > Hi all, > > I use the ajax updater with evalscripts=true. > > When I load HTML with included <script> tags, I get this error in > Opera 8.51: > > > > > > ------------------- snip ----------------------------- > > > > http://ccml.uni-weimar.de/ > > Timeout thread: delay 10 ms > > Error: > > name: EvalError > > message: Statement on line 258: Illegal use of eval > > Backtrace: > > Line 258 of linked script http://ccml.uni-weimar.de/javascripts/ > prototype.js > > results.push(iterator(value, index)); > > Line 227 of linked script http://ccml.uni-weimar.de/javascripts/ > prototype.js > > iterator(value, index++); > > Line 417 of linked script http://ccml.uni-weimar.de/javascripts/ > prototype.js > > iterator(this[i]); > > Line 231 of linked script http://ccml.uni-weimar.de/javascripts/ > prototype.js > > this._each(function (value) > > { > > try > > { > > iterator(value, index++); > > } > > catch (e) > > { > > if (e != $continue) > > throw e; > > } > > } > > ); > > Line 259 of linked script http://ccml.uni-weimar.de/javascripts/ > prototype.js > > this.each(function (value,index) > > { > > results.push(iterator(value, index)); > > } > > ); > > Line 160 of linked script http://ccml.uni-weimar.de/javascripts/ > prototype.js > > return this.extractScripts().map(eval); > > Line 1035 of linked script http://ccml.uni-weimar.de/javascripts/ > prototype.js > > content.evalScripts(); > > At unknown location > > [statement source code not available] > > ------------------- snip ----------------------------- > > > > > > I changed the evalscripts function to this: > > evalScripts: function() { > > ex=this.extractScripts(); > > for(x=0;x<ex.length;x++) { > > eval(ex[x]); > > } > > }, > > > > and now it works. Hmm... > > > > > > > > I had the same problem with Safari and Firefox. I am using the > version of prototype included with scriptaculous 1.5. The scripts > in my HTML fragment would not be executed properly in Safari and > Firefox would crash with a bus error (on Linux as well as on the > Mac). Your fix worked for me. Thanks! > > > > Tom > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Oh, but I think my suggestion of getting rid of "var" statements might
have implications for the scope of certain variables in
objects/methods...
rahul
________________________________
From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]
On Behalf Of Tom
Riley
Sent: Monday, December 19, 2005 10:04 AM
To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Subject: Re: [Rails-spinoffs] Re: possible opera+prototype bug in
evalscripts?
Yeah I was thinking about that - I had ''undeclared variable''
errors in
Safari for variables I had declared outside of any function.
Tom
On 19 Dec 2005, at 14:55, Rahul Bhargava wrote:
Hmm... I had firefox crashing on me, but it fixed when I took out any
declarations in my code that had a "var" in them.
So while this used to work for me:
var blah = ''fdsaf'';
Now that makes firefox crash, so I changed it to this:
blah = ''fdaf'';
and that worked fine.
I''ll try your fix and see if I can go back to my old code. Thanks,
rahul
________________________________
From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]
On Behalf Of Tom
Riley
Sent: Monday, December 19, 2005 9:44 AM
To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Subject: [Rails-spinoffs] Re: possible opera+prototype bug in
evalscripts?
Hi all,
I use the ajax updater with evalscripts=true.
When I load HTML with included <script> tags, I get this error
in Opera 8.51:
------------------- snip -----------------------------
http://ccml.uni-weimar.de/ <http://ccml.uni-weimar.de/>
Timeout thread: delay 10 ms
Error:
name: EvalError
message: Statement on line 258: Illegal use of eval
Backtrace:
Line 258 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
results.push(iterator(value, index));
Line 227 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
iterator(value, index++);
Line 417 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
iterator(this[i]);
Line 231 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
this._each(function (value)
{
try
{
iterator(value, index++);
}
catch (e)
{
if (e != $continue)
throw e;
}
}
);
Line 259 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
this.each(function (value,index)
{
results.push(iterator(value, index));
}
);
Line 160 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
return this.extractScripts().map(eval);
Line 1035 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
content.evalScripts();
At unknown location
[statement source code not available]
------------------- snip -----------------------------
I changed the evalscripts function to this:
evalScripts: function() {
ex=this.extractScripts();
for(x=0;x<ex.length;x++) {
eval(ex[x]);
}
},
and now it works. Hmm...
I had the same problem with Safari and Firefox. I am using the version
of prototype included with scriptaculous 1.5. The scripts in my HTML
fragment would not be executed properly in Safari and Firefox would
crash with a bus error (on Linux as well as on the Mac). Your fix worked
for me. Thanks!
Tom
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
More details on this one - the mozilla.org guys have been hot on the
case!
https://bugzilla.mozilla.org/show_bug.cgi?id=320172
They were kind enough to email me and pointed me towards that bug. They
have it fixed, probably will go out in a release in January they said.
In the meantime, the hack suggested here seems to work. It looks to
have been a problem in how eval was being called (with multiple args).
The fix calls eval explicitly with just one arg and that eliminates the
problem.
Rahul
________________________________
From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]
On Behalf Of Tom
Riley
Sent: Monday, December 19, 2005 10:04 AM
To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Subject: Re: [Rails-spinoffs] Re: possible opera+prototype bug in
evalscripts?
Yeah I was thinking about that - I had ''undeclared variable''
errors in
Safari for variables I had declared outside of any function.
Tom
On 19 Dec 2005, at 14:55, Rahul Bhargava wrote:
Hmm... I had firefox crashing on me, but it fixed when I took out any
declarations in my code that had a "var" in them.
So while this used to work for me:
var blah = ''fdsaf'';
Now that makes firefox crash, so I changed it to this:
blah = ''fdaf'';
and that worked fine.
I''ll try your fix and see if I can go back to my old code. Thanks,
rahul
________________________________
From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]
On Behalf Of Tom
Riley
Sent: Monday, December 19, 2005 9:44 AM
To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Subject: [Rails-spinoffs] Re: possible opera+prototype bug in
evalscripts?
Hi all,
I use the ajax updater with evalscripts=true.
When I load HTML with included <script> tags, I get this error
in Opera 8.51:
------------------- snip -----------------------------
http://ccml.uni-weimar.de/ <http://ccml.uni-weimar.de/>
Timeout thread: delay 10 ms
Error:
name: EvalError
message: Statement on line 258: Illegal use of eval
Backtrace:
Line 258 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
results.push(iterator(value, index));
Line 227 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
iterator(value, index++);
Line 417 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
iterator(this[i]);
Line 231 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
this._each(function (value)
{
try
{
iterator(value, index++);
}
catch (e)
{
if (e != $continue)
throw e;
}
}
);
Line 259 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
this.each(function (value,index)
{
results.push(iterator(value, index));
}
);
Line 160 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
return this.extractScripts().map(eval);
Line 1035 of linked script
http://ccml.uni-weimar.de/javascripts/prototype.js
<http://ccml.uni-weimar.de/javascripts/prototype.js>
content.evalScripts();
At unknown location
[statement source code not available]
------------------- snip -----------------------------
I changed the evalscripts function to this:
evalScripts: function() {
ex=this.extractScripts();
for(x=0;x<ex.length;x++) {
eval(ex[x]);
}
},
and now it works. Hmm...
I had the same problem with Safari and Firefox. I am using the version
of prototype included with scriptaculous 1.5. The scripts in my HTML
fragment would not be executed properly in Safari and Firefox would
crash with a bus error (on Linux as well as on the Mac). Your fix worked
for me. Thanks!
Tom
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
On Dec 19, 2005, at 11:00 AM, Rahul Bhargava wrote:> > Oh, but I think my suggestion of getting rid of “var” statements > might have implications for the scope of certain variables in > objects/methods… > > > > rahul > >Rahul, I recently ran in to the same problem, and removed the ''var'' prefixes to get my application to work. However, I''m not sure I understand the scope implications as you seem to. Can you explain what the difference is between declaring a variable with and without ''var'' in this context? Duane Johnson (canadaduane) _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Duane, This page explains it well I think. http://www.mredkj.com/tutorials/reference_js_intro_ex.html Plus it is just neat that it generates the rules when you load the page by setting up some vars and functions and trying to access them. Rahul ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Duane Johnson Sent: Thursday, December 22, 2005 3:26 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Re: possible opera+prototype bug in evalscripts? On Dec 19, 2005, at 11:00 AM, Rahul Bhargava wrote: Oh, but I think my suggestion of getting rid of "var" statements might have implications for the scope of certain variables in objects/methods... rahul Rahul, I recently ran in to the same problem, and removed the ''var'' prefixes to get my application to work. However, I''m not sure I understand the scope implications as you seem to. Can you explain what the difference is between declaring a variable with and without ''var'' in this context? Duane Johnson (canadaduane) _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs