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>

<table class="small_input" id="edit_table_279">
--SNIP--
</table>

<input type="button" value="test" />

Clicking the "test" button pops a "test is not defined" error. This is basically the same code that is in the example at http://www.sergiopereira.com/articles/prototype.js.html so I don't know what 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


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to