Results 1 to 4 of 4

Thread: JavaScript Selection Box - Tips or Ideas

  1. #1
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default JavaScript Selection Box - Tips or Ideas

    Hello-

    I'm working on coding a calendar selection element. It's your basic days in a grid sort of design. The challenge is that someone should be able to use their mouse to select a range of dates, much like how someone would select multiple files in a folder. More specifically, someone should be able to click with their mouse, drag a box, and release the mouse to select all of the dates within the selection box. Has anyone sen something like this? Any tips? Any ideas?

    Regards-
    Eric

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Flash can do that. But I am partial to it

    However, your request seems simple enough, and seems to want to work similar to holding the ctrl key and clicking various items to select them all...

    Knowing that... C+ can do it, which tells me there is a php and/or javascript that can as well.. just not sure how to do those myself.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Actually, this isn't a control-click sort of thing I'm looking to code. It's more of a drag a box around a bunch of elements and have everything inside that box be selected.

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Yes, I understood that part, MS OS does the same thing onthe desktop. If you click and hold and make a box around your desktop icons they all get selected.

    It IS very similar to the ctrl click method, except the code is put on mouseover and mouse down/up event handling.

    Like I said, Flash can do it with about 20 lines of script total, and Flash is very simialr to php and javascript (and uses both)

    Using that logic I am sure there is a PHP and/or javascript way of doing it, I just don't know how.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

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
  •