ohdang888 Posted August 5, 2008 Share Posted August 5, 2008 how would you create those things that facebook do... they don't pop out of the window, its just like a layer on top of the main page, and that layer can be removed or added?? i know i'll never be able to achieve it the whole way, i'm just wondering. Quote Link to comment https://forums.phpfreaks.com/topic/118285-solved-facebook-like-popup/ Share on other sites More sharing options...
lemmin Posted August 5, 2008 Share Posted August 5, 2008 Something like this? <html> <head> <script language="JScript"> function startDrag(e) { var offsetX = event.clientX-parseInt(e.style.left); var offsetY = event.clientY-parseInt(e.style.top); document.onmousemove = function() { e.style.left = event.clientX-offsetX; e.style.top = event.clientY-offsetY; } document.onmouseup=function() { document.onmousemove=null; } } </script> </head> <bodY> <div STYLE="position:absolute;width:100px;height:100px;background-color:#0000FF;left:0px;top:0px" onmousedown="startDrag(this)"></div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/118285-solved-facebook-like-popup/#findComment-608776 Share on other sites More sharing options...
RichardRotterdam Posted August 5, 2008 Share Posted August 5, 2008 you probably mean a modal its a layer above the normal page with the background faded I have only seen them with javascript frameworks though here is a couple of links using prototype http://prototype-window.xilinus.com/ using mootools http://www.e-magine.ro/web-dev-and-design/36/moodalbox/ jquery http://malsup.com/jquery/block/index-old.html#dialog hope that helps Quote Link to comment https://forums.phpfreaks.com/topic/118285-solved-facebook-like-popup/#findComment-608896 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.