Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   Click and Drag (http://www.velocityreviews.com/forums/t923281-click-and-drag.html)

Dan 02-28-2006 09:56 PM

Click and Drag
 
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


paul 03-01-2006 11:37 AM

Re: Click and Drag
 
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



Randy Webb 03-01-2006 12:15 PM

Re: Click and Drag
 
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/

paul 03-01-2006 12:35 PM

Re: Click and Drag
 
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




All times are GMT. The time now is 11:46 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.