search for: evalscript

Displaying 20 results from an estimated 206 matches for "evalscript".

Did you mean: evalscripts
2007 Oct 12
5
Evalscripts
Hey all, I''m just checking my understanding. Would someone be so kind as to comment on the following? Event.observe(''this_link'', ''click'', function() { AJAX.Updater(''that_div'', ''my.php'', { evalscripts: true}) }); <div that_div> </div> /////// my.php echo("<script>alert(''Loaded'')"); There''s a lot more to all of it than that, but this is where I''m hitting problems and I have no idea why. this is my first time using evalscripts...
2007 Nov 19
1
Running a script after evalScripts has completed
Hello, (I originally posted this on the Prototype-Core group by mistake, sorry) I am running a request via Ajax.Updater with evalScripts = true and an onComplete function. I find that my onComplete function executes before the script content has been evaluated. Looking through prototype.js (v. 1.5.1) this seems to be caused by the scripts being executed as part of this line (1352): setTimeout(function() {html.evalScripts()},...
2006 Mar 22
2
problem with Ajax.Updater evalscript and firefox
Hello there people, im having a problem with the Ajax.Updater evalscripts, i fill and div with a form that i get with the Ajax.Updater, that form had a javascript validation, i put evalScripts true but when i get the form i had an unexpected close in the firefox, i had a long time looking the answer but nothing yet, somebody with the same problem? or the answer? greets...
2005 Aug 23
2
using the evalScript option on Ajax.Updater
Hi all, I''m having trouble with the evalScript option on the Ajax.Updater. I''ve removed everything except for the ajax call and a simple alert to try and debug it. It doesn''t appear that the regex is finding my JS in the response... I''m doing an update request and the response is coming back correctly to the update...
2005 Dec 12
7
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 25...
2006 Mar 10
3
[Prototype] understanding evalScripts
Hi, I have a misunderstanding of what I though evalScripts would do vs what it actually does. I''m wondering if there''s a way that I can make it do what I want. my initial page: <html> <head> <script... var page = ''initial''; ... <body> <div id="replaceMe"...
2006 Mar 31
2
evalScript && onComplete
Howdy all, I have an Ajax.Updater with evalScript = true and I would like to execute some javascript *after* the scripts in the answer have been eval''ed. How can I do that ? I''ve tried with onComplete, but onComplete seems to be fired before the inner scripts. Thanks, Nicolas
2008 Apr 21
4
Does String.evalScripts() work on well-formed script tags?
Does String.evalScripts() work when the opening SCRIPT tag of a SCRIPT block contains common attributes? I''ve tried and it does not appear to be working. Here''s an example: <script type="text/javascript" charset="ISO-8859-1" language="JavaScript"> //<![CDATA[ &l...
2006 Apr 15
11
evalScripts in IE
My Ajax.Updater is set for evalScripts and it receives this: <script language="JavaScript">complete();</script> It works in FF but not IE. Is the above code the proper way to return scripts? Thanks!
2007 Jun 27
1
Prototype 151; Ajax.Updater vs Ajax.Request and evalScripts=true
Why does Ajax.Updater() and Ajax.Request() differ in how evalScripts is handled? Or doesn''t it, and I just got it wrong? I have a module that generates an Ajax request to insert dynamic content into a div. The dynamic content is plain vanilla HTML with some inline javascript *functions* I cannot get the browser to honor/execute/see those javascript funct...
2006 Apr 18
7
[Prototype] evalScripts not working for me
I think I am experiencing the variable scope problem with evalScripts. I have this block of code being returned from an Ajax.Updater call, as shown by FireBug or one of those other Firefox plugins. I have tried to boil it down to the minimum code. <script type="text/javascript"> test = function() { alert("test"); }; </script> &...
2008 Mar 22
4
Ajax.Updater not fully work in IE7
...lid #ccc; width: auto"></div> <br/> <a href="javascript:getTest()">test</a> </form> <script type="text/javascript"> function getTest() { new Ajax.Updater(''country'', ''test.php'', { evalScripts: true, asynchronous: true, parameters: {continent: 10} }); } </script> If i remove <form> tag: all work <div id="country" style="border: 1px solid #ccc; width: auto"></div> <br/> <a href="javascript:getTest()&quo...
2007 Mar 03
1
Ajax.Updater with evalScripts: true strips curly braces
When I return an html fragment to Ajax.Updater with evalScripts: true set, and there is a script fragment with curly braces in it (a function declaration or an object literal), the curly braces are getting stripped out somehow, and leaving me with invalid JS. I think this is the case because I put an alert in the evalScripts method right before the "retu...
2007 Nov 18
0
evalScript usage for script with src attribute
Is there anyway to do new Ajax.Request(''mailing-list-users.html'', { method: ''get'', evalScripts: true, onSuccess: function(transport){ var response = transport.responseText || "no response text"; $(''content'').innerHTML = response; }, onFailure: function(){ alert(''Something went wrong...'') }, onException: function(v1, v...
2005 Oct 19
1
js not executed after ajax.updater -- evalScript:true not a solution
...using Ajax.Updater. Inside this newly placed div, I am using classes and behavior.js to launch various Ajax things and scriptaculous effects. None of them, however, get triggered after the update. They also fire no javascript errors or anything of the kind. I''ve seen the option evalScripts with Ajax stuff-- but it''s only made for code between <script/> tags. I am wondering if there is a way to make sure that the behavior/class-ruled stuff gets triggered in the sections which have been updated by Ajax.Updater. Many thanks in advance. Tench
2006 Jul 02
6
remote form w/ evalScripts:true
...{ :class => "formfield", :onchange => "new Ajax.Request(''/admin/list_item_links/create?list_item_link [list_item_type]=List&list_item_link[list_id]=#{@list.id} &list_item_link[list_item_id]='' + this.options[selectedIndex].value,{asynchronous:true, evalScripts:true}); return false;" } %> The first example, using the form, results in javascript being rendered in the browser rather than being executed. Note that it does say ":eval_scripts => true" and that the resulting javascript does include "evalScripts:true". I...
2006 Apr 12
11
innerHTML and scripts not running
Hello, I''m having an issue with getting embedded javascript code to actually run when loaded via an Ajax.Request() call and the callback function inserts the generated HTML and js code to my current page. It seems that the javascript code is not properly parsing. For example, I''m using the following function showinfo() to return some html code. function showInfo(go_url){
2006 Jan 29
0
BUG in PROTOTYPE when set evalScripts: true - Firefox crashes
Hi all. I''m using Ajax Updater with evalScripts set to true and there must be a bug in prototype because when I call function firefox crashes and exit. I can''t even see Firefox javascript console. So I try it under Opera and Opera javascript Console show me this: http://localhost:8090/mysite/processSearch?pQuery=a Timeout thread: del...
2006 Mar 21
16
Javascript Code inside an Ajax response
Hi, i wish to run a function that came inside my Ajax response. I read that i have to use the evalScripts to make this, but still i couldn''t make it work. The error said that my function isn''t declared. I look at the Sergio Pereira tutorial about use the var xxx = function() but still doesn''t work. Someone could help me? In the response this is the code: for (var i = 0; i...
2006 Mar 18
9
RJS - not working in IE
I searched thru all the postings about RJS, and I didn''t find one person who complained of problems specific to IE, but that''s what I''ve got. My environment is: Rails 1.0 + RJS Plugin Updated Javascripts to Scriptaculous 1.5.3 (for evalScripts support) Monkeypatched in_place_editor to support evalScripts I have just started using RJS, and I have two .rjs templates. They are quite simple, each template has two page.replace_html statements, which look like: page.replace_html "some_id", :partial => "some_partial&qu...