SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Showing and hiding layers.

    I have a question. If you have a HTML list that pops up as a menu under a graphic in a layer when you mouseover the graphics, how do you instruct that layer to vanish again when you mouseout from the menu?

    I can do onMouseOver show the layer and onMouseOut hide the layer, but I'm stuck when it comes to applying that to a larger area (ie: multiple clickable items). I can think of ways of doing it, but they're a bit clunky and I'm assuming there's a good or 'proper' way of achieving this.

    G

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First, are you talking about editing the display or visiblity? Second, what browser compatibility are you wanting. Third, what do you mean by "multiple clickable items"? Is this a menu system? If not, what are you making?
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry. It is/was a menu system, but I've sussed it now. The trouble I was having was a table in the layer (containing the menu). Whenever the pointer hit an element of the table, it treated it is a mouseout event from the layer. Solved it by adding a mouseover command to the table.


  4. #4
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, cool.

    FYI, you could also cancel the bubbling of the event, which is what caused you headaches.

    eventObj.cancelBubble = true;
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  5. #5
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Does any of your objects start invisible? If so, change the method, otherwise your site is likely to be banned from search-engines. The bots go through your css looking for visibility:hidden or dispaly:none, and they don't like it when the find it, especially when links are involved. Try using scrolling divisions instead, or expanding/contracting menu systems. You can change the innerHTML of an empty division as well, so maybe that method can be applied.
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  6. #6
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys. That's interesting about the SE thing. This was just a prototype so I can tweak things. What if the visibilty instructions are held in a stylesheet rather than in the HTML? Would bots still get upset? The HTML they're crawling wouldn't contain any invisible info and you can put a 'no bots please' file in the CSS directory so they never see it....

  7. #7
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    bots can read external css, and they also look for css pointed from an external js.
    But, at the moment they cannot execute JS, so you can start all divs visible, then make them invisible onload. I am having a big argument about this at http://www.webmasterworld.com/forum3. Google are trying to ban various methods of dynamic text, just because spammers use it. It seems its the only way to detect it. Not good for us!!!! Its a good forum to join as you can follow what Google are up to.
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if


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
  •