On Apr 18, 2006, at 4:05 PM, Daniel Elmore wrote:
I just got done debugging my evalScripts calls and the test = function()I'm working in FF for right now. Incidentally, I tried the above code before and it didn't work. It's like the scripts aren't being evaluated at all.style JS did not work in IE. I had to simplify it to:<script type="text/javascript">alert("test");</script> That method worked in IE and FF.
I have one more block of code above that script block, so in effect two script blocks must be evaluated. It looks like the first one is being evaluated, but I'm not sure.
-----Original Message----- From: [EMAIL PROTECTED][mailto:[EMAIL PROTECTED] On Behalf Of BradEdiger Sent: Tuesday, April 18, 2006 3:58 PM To: [email protected] Subject: [Rails-spinoffs] [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 itdown to the minimum code. <script type="text/javascript"> test = function() { alert("test"); }; </script> <table class="small_input" id="edit_table_279"> --SNIP-- </table> <input type="button" onclick="test();" value="test" /> Clicking the "test" button pops a "test is not defined" error. This is basically the same code that is in the exampleat http://www.sergiopereira.com/articles/prototype.js.html so I don't knowwhat I'm doing wrong. Here is how I call Ajax.Updater: new Ajax.Updater(updateDiv, "Profile/update.aspx", { asynchronous: true, parameters: params, evalScripts: true, onComplete: function() { refresh_columns(); } }); Yes, I am stuck in ASP.NET for this project. :-( -- Brad Ediger 866-EDIGERS _______________________________________________ Rails-spinoffs mailing list [email protected] http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Rails-spinoffs mailing list [email protected] http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
