glenelkins Posted January 17, 2008 Share Posted January 17, 2008 Hi I have a load of <div> elements absolutely positioned within an editable textarea field. These objects can be dragged with the drag handle that appears on the selected div element I had to write a quick javascript function to bring the selected div element to zIndex 1 ( on top of all others ) so we can see the item we have dragged above all others: Div = document.getElementById ( "divelementidhere" ); Div.style.zIndex = 1; The issue is the drag handle on the top doesnt come to the front like the element itself does. Is there a way to change the handles zIndex as well? Link to comment https://forums.phpfreaks.com/topic/86449-div-element-drag-handle-zindex/ Share on other sites More sharing options...
glenelkins Posted January 17, 2008 Author Share Posted January 17, 2008 bump Link to comment https://forums.phpfreaks.com/topic/86449-div-element-drag-handle-zindex/#findComment-441826 Share on other sites More sharing options...
phpQuestioner Posted January 17, 2008 Share Posted January 17, 2008 The issue is the drag handle on the top doesnt come to the front like the element itself does. Is there a way to change the handles zIndex as well? what ??? Link to comment https://forums.phpfreaks.com/topic/86449-div-element-drag-handle-zindex/#findComment-442208 Share on other sites More sharing options...
tinker Posted January 17, 2008 Share Posted January 17, 2008 how's the drag handle drawn and handled (js)? your not showing this... Link to comment https://forums.phpfreaks.com/topic/86449-div-element-drag-handle-zindex/#findComment-442213 Share on other sites More sharing options...
glenelkins Posted January 20, 2008 Author Share Posted January 20, 2008 hi the elements are dragable when you use an IFRAME on a textarea to edit HTML code. When you click an absolute positioned element it creates a drag handle on the top The javascript brings the selected element to zindex 1, but the drag handle doesnt come to the front with it make sense? Link to comment https://forums.phpfreaks.com/topic/86449-div-element-drag-handle-zindex/#findComment-444226 Share on other sites More sharing options...
glenelkins Posted January 20, 2008 Author Share Posted January 20, 2008 basically you enable an IFRAME to be in editable mode with javascript. I think its a default browser capability...you can then drag div boxes...the handle appears on the top left Link to comment https://forums.phpfreaks.com/topic/86449-div-element-drag-handle-zindex/#findComment-444406 Share on other sites More sharing options...
glenelkins Posted January 21, 2008 Author Share Posted January 21, 2008 does anyone know what im talking about? Link to comment https://forums.phpfreaks.com/topic/86449-div-element-drag-handle-zindex/#findComment-445083 Share on other sites More sharing options...
emehrkay Posted January 21, 2008 Share Posted January 21, 2008 Well the question is how do on instantiate the drag? I'm pretty sure you can just add a zindex increment to that event Link to comment https://forums.phpfreaks.com/topic/86449-div-element-drag-handle-zindex/#findComment-445161 Share on other sites More sharing options...
glenelkins Posted January 21, 2008 Author Share Posted January 21, 2008 hi lets change this here. Say i wrote the javascript to make an element dragable. How would i then enable the new div position HTML code be posted to a php script for saving? As the html code doesnt actually change on the fly in the page source? Link to comment https://forums.phpfreaks.com/topic/86449-div-element-drag-handle-zindex/#findComment-445191 Share on other sites More sharing options...
emehrkay Posted January 21, 2008 Share Posted January 21, 2008 You can write the coordinates to a cookie, or send them to the server with an httprequest (ajax) Link to comment https://forums.phpfreaks.com/topic/86449-div-element-drag-handle-zindex/#findComment-445296 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.