Results 1 to 8 of 8

Thread: Anchored DIV

  1. #1
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default Anchored DIV

    Ok, I've Googled to no avail. I am curious as to how sometimes on click a DIV or table or whatever, will appear where you click, is it anchored somehow using CSS, or is there some type of JavaScript form.here() or something I was not aware of? Please and thank you.

    Tim

    edit: i know someone here knows how to do it....
    Last edited by TimFA; 12-23-2007 at 06:20 PM.

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

  3. #3
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    You have mistaken what I mean't, I know how to show and hide, I want to know how a DIV appears "over" everything else, as in like a tool tip. I can do that exact effect described in your second link, and more easily. The way that it doesn't have a static location, it can be wherever your cursor is.

    edit: i just re-read my first post, and not that this will confuse anyone, but to clarify when I said form.here I was saying form (as in make) at this location, not form like a contact form.

  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

    Something like this then?

    I too, am not exactly sure what you are trying to describe. I understand the idea, just not the visual. If you have an example page we can take a look.

    If it is not the above link then I am thinking it will be a pop up type of action using JS to show it on the page.
    {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

  5. #5
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    I understand how it shows itself, I am asking like with Windows, a tool tip how its location is not static, it is wherever you happen to be when it appears, other than the fact you have to be inside the object. I guess I am asking how to make JavaScript calculate where your mouse is almost.

    edit: and Blizzard your link was close, but since I'm not necessarily going to use it, and I was just asking to add it to what I can do if needed, going with something other than what I asked about was not an option.

  6. #6
    Join Date
    Dec 2007
    Location
    Ankara, Turkey
    Posts
    160
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default

    I wrote a code a few years ago which checked the spaces in the page(veritcal&horizontal) and the width&hieght of a container and positioned it to the best place possible. If this is what you want, I can digg and find that code?

  7. #7
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    No don't worry about it then, I was just curious as to what method is used.

  8. #8
    Join Date
    Dec 2007
    Location
    Ankara, Turkey
    Posts
    160
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default

    As I remember so far is that it was similar to the menu pop-up system of the Windows. It first checked if it can open the pop-up to the right of the cursor, which meant the left pos is equal to the cursor's left pos, and then to the same thing for the vertical direction for downwards. If any of them does not have the sufficiant space for a complete view, ith then subtracts the offsetHeight or the offsetWidth of the pop-up element form the current position of the cursor and voila

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
  •