Metachecker.net
|
TrafficChecker.net
|
RankChecker.net
Learn Java Script Today
|
Over 5000 Free Fonts
|
Tutorials
|
Javascript Forum
|
Other Javascript Resources
|
Cheat Sheet
JavaScript Basics
Inserting Javascript
Complete Tutorial
Advance DHTML Tutorial
Script archive
Advanced Tutorials
Alert Scripts
Animation
Audio
Background Effects
Banner Ads
Browser Window
Buttons
Button Forms
Calculcators
Calendars
Clocks & Dates
Cookies
Cursor Effects
DHMTL Games
DHTML Miscellaneous
Equivalents
Forms
Games
IE4+ Scripts
IE5+ Scripts
Image Effects
Image Miscellaneous
Links & Buttons
Math Related
Messages Miscellaneous
Miscellaneous
Mouse Tricks
Navigation
Page Details
Password Protection
Pulldown Menus
Random Stuff
Scrolling
Status Bar
Text Animation
User Detail
User Info
Window Control
Generic Drag Layer
This is a great drag-layer script that allows you to enable any layer to be dragable! Very easy to install and degrades well with all browsers.
Insert into <HEAD>
<script language="JavaScript1.2"> var nsx var nsy var nstemp function drag_drop(name){ temp=eval(name) temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP) temp.onmousedown=go temp.onmousemove=drag temp.onmouseup=stop } function go(e){ temp.captureEvents(Event.MOUSEMOVE) nsx=e.x nsy=e.y } function drag(e){ temp.moveBy(e.x-nsx,e.y-nsy) return false } function stop(){ temp.releaseEvents(Event.MOUSEMOVE) } </script>
Insert into <BODY>
Other Options
Now, to make a layer dragable, just add the following onMouseover event handler into the layer tag: <layer onMouseover="drag_drop(this)"> " </layer> Drag away!