Hi,

Sounds like you're new to Prototype - welcome!

When working with Prototype DOM extensions, you have to use $() to get
the element unless you got it from a Prototype method (in which case,
Prototype has already done it for you).  Here's why:
http://prototypejs.org/learn/extensions

So just change

    document.body.update('Foo');

to

    $(document.body).update('Foo');

(But do read the link, so you know why.)

HTH,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Feb 20, 10:51 am, lacco <schlichting....@googlemail.com> wrote:
> Hi!
> I just tried to use prototype for writing "Foo" into document's body
> (in fact, I just broke down a little more complex code into this). But
> the IE doesn't find the document.body.update function (in Firefox, all
> works perfect):
>
> <html>
>   <head>
>     <script src="/javascripts/prototype-1.6.0.3.js" type="text/
> javascript"></script>
>     <script type="text/javascript">
>       Event.observe(window, 'load', function(){
>             document.body.update('Foo');
>       });
>     </script>
>   </head>
>   <body></body>
> </html>
>
> Am I using the correct DOM event on IE, or which other mistake is in
> my code?
>
> Thank you!
--~--~---------~--~----~------------~-------~--~----~
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-scriptaculous@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to