1、send some script:
 var scriptString = "some script.....";
       var ajaxOptions = {
                method:       "post",
                asynchronous: true,
                contentType:  "application/x-www-form-urlencoded",
                encoding:     "utf-8",
                parameters :  "scriptString = " + scriptString,
                onSuccess : this.ajaxUpdate.bind(this),
                onFailure : this.handleError.bind(this)
                };
2、execute the updated script:
    ajaxUpdate:  function(request) {
            var updatedScriptString = request.responseText;
            updatedScriptString.evalScripts();
     },


On 4月20日, 上午9时21分, Mike <[EMAIL PROTECTED]> wrote:
> Hello, I need a way to send some script in a div or a form field to
> the server,
> have the server read it, then return the updated script to the div or
> form field.
>
> I can do the div and form field and such, I just need someone to
> explain to me how to do this. Can this be done? Thank you very much.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to