Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 09-26-2006, 12:36 PM   #1 (permalink)
Salchester
Salchester
 
Salchester's Avatar
 
Join Date: Jul 2005
Location: In a house
Posts: 230
Salchester is an unknown quantity at this point
Draggable Div

Howdy Coders!!!

In IE only, how can I Drag 'N' Drop a div around the screen, by clicking it to grab, and double clicking it again to release.

Many Thanks,
__________________
Many Thanks, in advance!

Salchester.
The Future Is Here - Are You Ready?
Salchester is offline   Reply With Quote
Old 09-27-2006, 10:57 PM   #2 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 660
DJMaze is on a distinguished road
what did you already try to achieve this?
__________________

UT: Ultra-kill... God like!
DJMaze is offline   Reply With Quote
Old 09-28-2006, 12:03 AM   #3 (permalink)
teknomage1
Jack of all trades
 
teknomage1's Avatar
 
Join Date: Feb 2005
Location: Los Angeles
Posts: 596
teknomage1 is on a distinguished road
Send a message via AIM to teknomage1
I think it can be achieved by setting the style property of the div to absolute in the click handler, and by then setting the top and left attributes to the value of the screenX and screenY of the mouse events. You then install another onclick handler to stop updating the position when the user clicks again.
__________________
Stop intellectual property from infringing on me
teknomage1 is offline   Reply With Quote
Old 09-28-2006, 09:20 AM   #4 (permalink)
Salchester
Salchester
 
Salchester's Avatar
 
Join Date: Jul 2005
Location: In a house
Posts: 230
Salchester is an unknown quantity at this point
How would this be coded, as i'm kinda new to javascript at this level.

Many Thanks,
__________________
Many Thanks, in advance!

Salchester.
The Future Is Here - Are You Ready?
Salchester is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Div Link Salchester HTML, XML, Javascript, AJAX 3 08-22-2006 04:27 PM
Any way to reload/update or retrieve content in a div element? morpheuz HTML, XML, Javascript, AJAX 7 01-18-2006 04:40 AM
prevent highlighting of text in a div? sde HTML, XML, Javascript, AJAX 3 12-28-2005 09:25 PM
div problems falsepride HTML, XML, Javascript, AJAX 2 12-15-2004 10:40 AM


All times are GMT -8. The time now is 08:05 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting