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? Quote Link to comment Share on other sites More sharing options...
glenelkins Posted January 17, 2008 Author Share Posted January 17, 2008 bump Quote Link to comment 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 ??? Quote Link to comment 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... Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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? Quote Link to comment 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) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.