> $('foo').update('<script ..... ' + this.someVariable + '/>);

You're inserting a script tag, which means the code should be
evaluated. Don't you want to use a <code> or <pre> tag instead? Or do
you want the text "<script..." to actually show up?

Just think in terms of how you would do this if you were just writing
a boring old HTML page. For instance, if you actually want the
characters "<script ....." to show up in the rendered page, how would
you do that? That's right, "&lt;script ....."

T.J. Crowder
Independent Software Consultant
tj / crowder software / com

On Dec 7, 10:52 pm, JoJo <> wrote:
> I have a <textarea id="foo"> which contains JS code that people can
> copy and paste. It's dynamically generated, so I do something like
> this:
> $('foo').update('<script ..... ' + this.someVariable + '/>);
> The documentation on Element.update states that the script will be
> evaluated rather than inserted literally. It does not tell me how to
> stop the evaluation. How may I do this?


You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to