Inspired partly by what others are posting here, and partly out of necessity, I threw together a "floating dialog" widget class. It''s more or less a rip-off of the dialog widget from the Dojo framework - I had a need for something similar, but didn''t want to move outside of the Prototype/Scriptaculous libraries. When activated, the "dialog" floats in fixed position at the center of the viewable window, and an semi-translucent "underlay" is placed over the page, preventing the user from clicking any links or buttons. http://bbuchs.f2o.org/floatingdialog/ The style for the dialog box is fully controlled by CSS, but in order to make it work in both IE & FF (haven''t tested Opera or Safari yet - sorry), there''s a CSS hack that needs to be applied to the body. Not sure if I can/should try to apply that hack when the object is created, or to just include the extra CSS on the page itself. It''s my first attempt at something like this, so I''d appreciate any feedback or suggestions. - bryan
Just a quick note...it appears that the "disabling" mask doesn''t apply to content that''s not visible when the dialog is shown (at least in FF1.5). To see the issue, open the link in FF1.5, click one of the links, then use your mouse scroll wheel to scroll the content down. The content at the bottom of the page is selectable. -Jerod
Looks cool, but I''d like to see the source code as well, if possible. Where is it hiding? :) Cheers, Tench On 16 Dec. 2005., at 23:34, Bryan Buchs wrote:> Inspired partly by what others are posting here, and partly out of > necessity, I threw together a "floating dialog" widget class. It''s > more or > less a rip-off of the dialog widget from the Dojo framework - I had > a need > for something similar, but didn''t want to move outside of the > Prototype/Scriptaculous libraries. > > When activated, the "dialog" floats in fixed position at the center > of the > viewable window, and an semi-translucent "underlay" is placed over > the page, > preventing the user from clicking any links or buttons. > > http://bbuchs.f2o.org/floatingdialog/ > > The style for the dialog box is fully controlled by CSS, but in > order to > make it work in both IE & FF (haven''t tested Opera or Safari yet - > sorry), > there''s a CSS hack that needs to be applied to the body. Not sure if I > can/should try to apply that hack when the object is created, or to > just > include the extra CSS on the page itself. > > It''s my first attempt at something like this, so I''d appreciate any > feedback > or suggestions. > > - bryan > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Seems to work ok in Safari, although when the floating dialog is displayed, the browser scrollbars shorten, as if the page suddenly got longer. They go back to normal as soon as the dialog''s closed, though.> http://bbuchs.f2o.org/floatingdialog/ > > The style for the dialog box is fully controlled by CSS, but in > order to > make it work in both IE & FF (haven''t tested Opera or Safari yet - > sorry),