SmokingMan Posted May 9, 2008 Share Posted May 9, 2008 I wanted to use the "onmouseover" and "onmouseoff" events to open a popup and close it. It works, but much to slowly. I was wondering if I put an image on the page and set the display property to "none" to hide it, would I be able to use the mouse events to change the style to "inline" to display it when the mouse triggers the event? And if so, would I need to set the "z-index" to be sure it displays on top of whatever part of the page it's on? Link to comment Share on other sites More sharing options...
jeffman Posted May 10, 2008 Share Posted May 10, 2008 Popups ###### for "pseudo-dialogs."I do this sort of thing a lot. The alert and confirm dialogs just aren't robust enough to get the job done. Toggling display can work, but only if the other items have absolute positioning, since toggling display to block can move normally positioned stuff around.Toggling visibility works, and preserves positioning, but if I recall IE gets touchy if you try to change the content of an invisible item. FF 1-2x (MAC) has scrollbar issues with visibility. AND THEY DON'T CARE since the issues are fixed in 3. Meanwhile . . .I often leave a div visible but set its coords off screen, at like -1000, -1000. Items on such a div can get tabbed to focus (eg, user starts typing in off screen item), however, so you might want a routine that disables all form elements if a div is off screen.Yeah, play with zIndex. Don't be afraid of stupid numbers, like 100, if you have any doubts. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.