Hey Gareth,

thank you for the quick response. if i use $(document.create....); it
works...
great piece of code!

regards
deniz

On 5 Jun., 12:38, "Gareth Evans" <[EMAIL PROTECTED]> wrote:
> IE doesn't prototype dom elements like firefox.
> If you wrap your createElement in a $ or use the new Element method in
> 1.5.2(i think, which isn't realised yet) then the element will be
> extended.
>
> [code]
>
> var div= $(document.createElement("div"));
>
> /* drops a "[object-error]" */
> div.addClassName("foo");
>
> /* works, but is not really nice... */
> Element.addClassName(div, "foo");
>
> document.body.appendChild(div);
>
> [/code]
>
> On 6/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hey,
>
> > I have a problem using prototype with internet explorer 7. it seems
> > like the extended methods for "Element" don't work right.
>
> > [code]
>
> > var div= document.createElement("div");
>
> > /* drops a "[object-error]" */
> > div.addClassName("foo");
>
> > /* works, but is not really nice... */
> > Element.addClassName(div, "foo");
>
> > document.body.appendChild(div);
>
> > [/code]
>
> > Could it be that the extended methods are only available to objects
> > already append'ed to the page?
> > Any suggestions appreciated!
>
> > regards
> > deniz


--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-spinoffs@googlegroups.com
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