SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru Richi's Avatar
    Join Date
    Jul 2001
    Location
    Hu,Bp.
    Posts
    842
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    detect layer A is on layer B ..then .. How ?

    hi ..

    how can i do this, i wanna drag layer into another, then i`ll get alert !

    the idea that i have some images, and i had put trash icon on down left of the browser, when i drag the image into the trash the image will be delete via php code, put i don`t how to make this with js , any idea ?



    thx

  2. #2
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Richi
    ...when i drag the image into the trash the image will be delete via php code
    You mean: When the mouse button is released and the image is dragged on top of the trash can => delete image?

    On the mouse up event, check if (pixelLeft, pixelTop) * for the div with the image is between (pixelLeft, pixelTop) and
    (pixelLeft + width, pixelTop + height) for the trash can div

    * or (style.left, style.top)

    To delete the image, call your deleteImage.php page with the image name as a parameter (use javascript to post a form, change location or popup a window with the php page as url)

    Need help with drag & drop script?

  3. #3
    JavaScript Guru (Big Ego) Arielladog's Avatar
    Join Date
    Jul 1999
    Location
    SC, USA
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's a DHTML tutorial I wrote:

    http://www.pageresource.com/dhtml/ryan/index.html

    THis is covered in ther.e..specifically here:

    http://www.pageresource.com/dhtml/ryan/part2-6.html

    aDog

  4. #4
    SitePoint Guru Richi's Avatar
    Join Date
    Jul 2001
    Location
    Hu,Bp.
    Posts
    842
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thx alot ...

    what i need is in ths page , i`ll try to use it

    http://www.pageresource.com/dhtml/ryan/part2-8.html


    thx again )

  5. #5
    SitePoint Guru Richi's Avatar
    Join Date
    Jul 2001
    Location
    Hu,Bp.
    Posts
    842
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok ...

    i have now 1 problem , the trash layer is down right, i need to make scroll down while scrolling, but in this way the Y and X will change , then how ?

  6. #6
    SitePoint Guru Richi's Avatar
    Join Date
    Jul 2001
    Location
    Hu,Bp.
    Posts
    842
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    any1 plz ?!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •