See my response to your other question. :-)
There are legitimate uses for document.write though. Document.write() will
write the output into the HTML source immediately (good for loading
dependent libraries or stylesheets), but element injection requires the DOM
to be already built.
-Fred
On Fri, Jun 13, 2008 at 8:02 AM, AlannY <[EMAIL PROTECTED]> wrote:
> How to replace the JavaScript in Prototype's style: new Element?
>
> I need something similar:
>
> <div>
> <script type="text/javascript">
> <!--
> var span = new Element('span');
> document.write(span); // <- THAT IS
> </script>
> </div>
>
> I mean, I need to place <new Element> in DOM there script is
> called ;-) How to do it? Exactly threre the script is called, 'cause I
> don't known where it called ;-)
>
> Thank you ;-)
--
Science answers questions; philosophy questions answers.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---