Yeah, it's still a work in progress. Thanks for tracking it down enough
that you determined the problem is in the drop shadows bit. I can
probably remove them for safari, but I think it'll really help the
visitor to the site understand that the menu is drag-and-drop capable
with the drop-shadows. Safari users might just be without that visual
cue.
I'll dissect the rest of your information when I have the time. I've
got another project to finish up in about 45 minutes and then it's back
to getting that menu running and connecting it to the actual program
that it will be running within.
As for the click events, I had them attached specifically to the images
and the labels (since that's what I really want clickable) but that
wasn't working for Safari at all. So I tried switching the click events
to the overall $("draggables") div and then detecting which element
within that div caused the event. That seemed to work for the images
but not the labels on my end of things but works for both on yours (and
Courtenay's) side. Either way, I've still got some hacking to do before
I can call the menu complete.
Thanks for your help, Fred.
-- Dash --
Fred wrote:
>
> 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
-~----------~----~----~----~------~----~------~--~---