Have a look at this: http://prototypejs.org/learn/extensions

Should help you solve your problem.

Best,

Tobie

On Feb 15, 9:33 pm, pwnedd <[EMAIL PROTECTED]> wrote:
> I have also run into similar troubles with IE. I would like to do
> something like:
>
> var myDiv = document.createElement("div");
> div.setStyle({backgroundColor:'#000000'});
>
> However, the above code produces an error in ie7 ("object doesn't
> support this property or method.")
>
> I *can* get it to work using Element.setStyle(div, {...}), but does
> anyone know why the former doesn't work,
> or how I could get it to work? You mentioned above setting an event
> handler for onLoad. The above
> occurs after the document has loaded and onLoad has been fired so I
> don't think that will help.
>
> Any advice would be greatly appreciated,
>
> Thanks!
> Keith
>
> On Feb 8, 2:53 pm, Matt Foster <[EMAIL PROTECTED]> wrote:
>
> > You can always go back to the basics and say
>
> > element.style.left = "200px";
>
> > Or you could just omit IE users, i think thats the better
> > approach  ;-)
>
> > On Feb 8, 11:47 am, Rauan Maemirov <[EMAIL PROTECTED]> wrote:
>
> > > Yeah, that's would be right. But I'm adding new elements in js-
> > > scripts. So, there's no difference.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to