Click and Drag

Discussion in 'Javascript' started by Dan, Feb 28, 2006.

  1. Dan

    Dan Guest

    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
    Dan, Feb 28, 2006
    #1
    1. Advertising

  2. Dan

    paul Guest

    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
    paul, Mar 1, 2006
    #2
    1. Advertising

  3. Dan

    Randy Webb Guest

    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/
    Randy Webb, Mar 1, 2006
    #3
  4. Dan

    paul Guest

    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
    paul, Mar 1, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris
    Replies:
    1
    Views:
    584
    Alex Molochnikov
    Apr 6, 2004
  2. spohle
    Replies:
    0
    Views:
    366
    spohle
    May 22, 2006
  3. ThunderMusic
    Replies:
    5
    Views:
    504
    ThunderMusic
    Sep 18, 2006
  4. Wijaya Edward
    Replies:
    5
    Views:
    300
    Diez B. Roggisch
    Oct 13, 2006
  5. ThunderMusic
    Replies:
    5
    Views:
    125
    ThunderMusic
    Sep 18, 2006
Loading...

Share This Page