Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Click and Drag

Reply
Thread Tools

Click and Drag

 
 
Dan
Guest
Posts: n/a
 
      02-28-2006
Hi,

I had an interesting idea recently to implement on my dynamic site.

I would like to have the users be able to click on object 1 and drag it
overtop of object 2. Object 1 and object 2 should be div tags so that
they could go around anything. When the user starts to drag object 1,
a parcially transparent object 1 appears wherever the mouse goes (we
will call this object 3) and the original object 1 disappears. After
the user lets go of object 1 ontop of object 2, object 3 disappears and
a javascript occurs (i will add this to the script later). If object 1
is let go not ontop of object 2 then the original object 1 reappears
where it used to be and object 3 disappears.

Also, while all this clicking and draging is going on the user should
be able to click and drag to scroll the page.

Unfortunately i have no idea how to do any of this. If anyone could
help me with this it would be appreciated. This is kind of what you
can do to files and folders in Windows XP.

Please tell me if any of this is unclear.

Thanks,

Dan

 
Reply With Quote
 
 
 
 
paul
Guest
Posts: n/a
 
      03-01-2006
Dan wrote:
> Hi,
>
> I had an interesting idea recently to implement on my dynamic site.
>
> I would like to have the users be able to click on object 1 and drag it
> overtop of object 2. Object 1 and object 2 should be div tags so that
> they could go around anything. When the user starts to drag object 1,
> a parcially transparent object 1 appears wherever the mouse goes (we
> will call this object 3) and the original object 1 disappears. After
> the user lets go of object 1 ontop of object 2, object 3 disappears and
> a javascript occurs (i will add this to the script later). If object 1
> is let go not ontop of object 2 then the original object 1 reappears
> where it used to be and object 3 disappears.
>
> Also, while all this clicking and draging is going on the user should
> be able to click and drag to scroll the page.
>
> Unfortunately i have no idea how to do any of this. If anyone could
> help me with this it would be appreciated. This is kind of what you
> can do to files and folders in Windows XP.
>
> Please tell me if any of this is unclear.
>
> Thanks,
>
> Dan

HI! Take a look at what this guy did. Its sounds alot like what you just
discribed. He created popup windows that can be altogether on one page and
can be expanded, moved around ect..except there are NOT popup windows. they
are Div tags.

http://scriptasylum.com/misc/popup/popup.html

Paul


 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      03-01-2006
paul said the following on 3/1/2006 6:37 AM:
> Dan wrote:
>> Hi,
>>
>> I had an interesting idea recently to implement on my dynamic site.
>>
>> I would like to have the users be able to click on object 1 and drag it
>> overtop of object 2. Object 1 and object 2 should be div tags so that
>> they could go around anything. When the user starts to drag object 1,
>> a parcially transparent object 1 appears wherever the mouse goes (we
>> will call this object 3) and the original object 1 disappears. After
>> the user lets go of object 1 ontop of object 2, object 3 disappears and
>> a javascript occurs (i will add this to the script later). If object 1
>> is let go not ontop of object 2 then the original object 1 reappears
>> where it used to be and object 3 disappears.
>>
>> Also, while all this clicking and draging is going on the user should
>> be able to click and drag to scroll the page.
>>
>> Unfortunately i have no idea how to do any of this. If anyone could
>> help me with this it would be appreciated. This is kind of what you
>> can do to files and folders in Windows XP.
>>
>> Please tell me if any of this is unclear.
>>
>> Thanks,
>>
>> Dan

> HI! Take a look at what this guy did. Its sounds alot like what you just
> discribed. He created popup windows that can be altogether on one page and
> can be expanded, moved around ect..except there are NOT popup windows. they
> are Div tags.


But it's not a good place to start looking to learn how to script. It is

When the first four lines of actual code look like this:

var w3c=(document.getElementById)? true: false;
var ns4=(document.layers)?true:false;
var ie5=(w3c && document.all)? true : false;
var ns6=(w3c && !document.all)? true: false;

Leave and don't look back.

> http://scriptasylum.com/misc/popup/popup.html


<URL: http://www.litotes.demon.co.uk/js_info/pop_ups.html >

Is a better example.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
 
Reply With Quote
 
paul
Guest
Posts: n/a
 
      03-01-2006
Randy Webb wrote:
> paul said the following on 3/1/2006 6:37 AM:
>> Dan wrote:
>>> Hi,
>>>
>>> I had an interesting idea recently to implement on my dynamic site.
>>>
>>> I would like to have the users be able to click on object 1 and drag it
>>> overtop of object 2. Object 1 and object 2 should be div tags so that
>>> they could go around anything. When the user starts to drag object 1,
>>> a parcially transparent object 1 appears wherever the mouse goes (we
>>> will call this object 3) and the original object 1 disappears. After
>>> the user lets go of object 1 ontop of object 2, object 3 disappears and
>>> a javascript occurs (i will add this to the script later). If object 1
>>> is let go not ontop of object 2 then the original object 1 reappears
>>> where it used to be and object 3 disappears.
>>>
>>> Also, while all this clicking and draging is going on the user should
>>> be able to click and drag to scroll the page.
>>>
>>> Unfortunately i have no idea how to do any of this. If anyone could
>>> help me with this it would be appreciated. This is kind of what you
>>> can do to files and folders in Windows XP.
>>>
>>> Please tell me if any of this is unclear.
>>>
>>> Thanks,
>>>
>>> Dan

>> HI! Take a look at what this guy did. Its sounds alot like what you just
>> discribed. He created popup windows that can be altogether on one page
>> and can be expanded, moved around ect..except there are NOT popup
>> windows. they are Div tags.

>
> But it's not a good place to start looking to learn how to script. It is
>
> When the first four lines of actual code look like this:
>
> var w3c=(document.getElementById)? true: false;
> var ns4=(document.layers)?true:false;
> var ie5=(w3c && document.all)? true : false;
> var ns6=(w3c && !document.all)? true: false;
>
> Leave and don't look back.
>
>> http://scriptasylum.com/misc/popup/popup.html

>
> <URL: http://www.litotes.demon.co.uk/js_info/pop_ups.html >
>
> Is a better example.


HI! Randy, Thanks for the link. I like the explanations and examples he
gives.

Paul


 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
click click click Andy Morrison Computer Support 7 12-20-2007 06:50 AM
Click and Drag Functionality in Web Apps with Python Wijaya Edward Python 5 10-13-2006 10:10 AM
Control of a map where the user can click and drag to select an area... ThunderMusic ASP .Net Web Controls 5 09-18-2006 12:11 AM
Control of a map where the user can click and drag to select an area... ThunderMusic ASP .Net 5 09-18-2006 12:11 AM
Bug in mouse (click/drag) events under Windows? Chris Java 1 04-06-2004 07:04 AM



Advertisments