View Full Version : How to drag the img. under the frame?

04-01-2007, 05:03 PM
1) Script Title: DOM Drag&Drop script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex11/domdrag/

3) Describe problem:
link: http://www.easyto.eu/drag-test.htm

I built a frame and can not make a map move and hide behind it.
Do I have to change a script in file "dom-drag.js" ?

Please, help.

04-02-2007, 01:05 PM
If somebody knows any other website where I can search for an answer,
Please, let me know.

04-02-2007, 03:52 PM

But, to answer your question, if you want to drag behind something, you will need the foreground item to have a higher z-index than the dragged item. There is no z-index assigned by the script but, if your dragged elements or elements inside them have one or have one assigned by a script - well, just to be safe, give your foreground element a z-index of 1000000 or even higher if you are already using higher z-index values on the page. To use its z-index value, your foreground element must also have position either relative (recommended) or absolute.

One other thing though, no matter what you do concerning the above, once the dragable element moves behind the foreground element, if this blocks the cursor's contact with the dragable element, it may be dropped or may at least stop moving. If this does happen and is undesirable, a modification to the drag script should be able to change this behavior.

04-02-2007, 05:14 PM
It works wonderfull!
But now another issue with a table.
Check this out...

I need it totally opposite. The table must be translucent and img hiden behind the frame.
i want to make it looks like a window with a dragable img in it.

04-02-2007, 05:40 PM
Negative z-index values are unpredictable at best. Your table has no position property. When I have more time, I will revisit your demo to see if I can figure out what exactly you are trying to do. In the meantime, see if you can work it out or, at least explain what you are going for more clearly.

04-02-2007, 05:46 PM
Thank you ,
I will try to add possition property to the table and see if I can work it out :-)