On Apr 6, 5:32 pm, "Fred" <[EMAIL PROTECTED]> wrote:
> On Apr 5, 8:00 am, David Dashifen Kees <[EMAIL PROTECTED]> wrote:
>
> > Demo Site: http://www.dashifen.com/temp/drag_test/index.htm
>
> > Check out the site above. You'll see a very small menu with a lot of
> > behaviors attached. In Firefox, IE 6/7, and Opera things go as
> > planned. You can click the arrow in the menu's header and it shrinks
> > the menu to a column of icons, and you can reverse this by re-clicking
> > the arrow. Plus, you can click either icons or labels within the menu
> > and get little alert boxes which replace stub functions for the moment.
>
> > But, in Safari, there's all sorts of problems.
>
> Well, one.
Two: the way you modify the path to the green arrow image is an issue
too - but using CSS instead of hard-coded script will fix that.
[...]
> > but #2 will fail and
>
> Yes, with error:
>
> Null valuehttp://www.dashifen.com/temp/drag_test/index.htm Line: 56
>
> Which is the last line of:
>
> function show_hide_menu() {
> path = "media/images/controls/";
> img = $("show_hide_menu").down();
>
> There doesn't appear to be any good reason why those variables should
> be global. Anyhow, $("show_hide_menu") returns null, so calling
> down() is doomed (i.e. this isn't a problem with down(), but with $
> () ).
>
> I suspect that it is due to Safari attempting to mimic IE's behaviour
Wrong. It is related to the applyDropShadows function, which somehow
masks show_hide_menu and builder_menu so that when you try to access
them by id, the call returns null. Get rid of it and your menu works
in Safari.
I'm not going to debug it.
[...]
> Why not put the onclick attributes on li elements themselves instead
> of detecting the element that the click came from and all that switch
> stuff?
I still think that's the best idea. Get rid of the hard-coded ids
(you repeatedly get the same element by id or up/down when you could
have just passed an element reference).
--
Fred
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---