JoJo, > $('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, "<script ....." HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com On Dec 7, 10:52 pm, JoJo <tokyot...@gmail.com> 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 & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.