SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast Lulabyte's Avatar
    Join Date
    Aug 2001
    Location
    Yamato-shi, Japan
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question JavaScript Question

    Hey, everybody --

    I'm working on my website and I want to insert the effect that this website has:

    http://4visions.net/

    Notice how when you hover your link over "enter" link, it shows the recommendations. Can anybody send me a good tutorial for this script so that I may place the same effect on my website? Thank you!

    -- Lu Lu

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks like they just used Dreamweaver's show-hide layers to do that.
    Code:
    function MM_findObj(n, d) { //v4.0
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && document.getElementById) x=document.getElementById(n); return x;
    }
    
    function MM_showHideLayers() { //v3.0
      var i,p,v,obj,args=MM_showHideLayers.arguments;
      for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
        if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
        obj.visibility=v; }
    }

  3. #3
    SitePoint Enthusiast Lulabyte's Avatar
    Join Date
    Aug 2001
    Location
    Yamato-shi, Japan
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking Woohoo!

    Ah, thank you --

    I got it to work! Now, there's only one problem left - on the website that I gave you (http://4visions.net), you can minimize the window or resize it an such, and the hidden/shown layer will always be in the same place. If I minimize my window, the layers move.

    How do I fix this?

    -- Lu Lu

  4. #4
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did notice this quirk. But the best way to fix it is by assigning "position:absolute" to the layer. That way it won't move.
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  5. #5
    SitePoint Enthusiast Lulabyte's Avatar
    Join Date
    Aug 2001
    Location
    Yamato-shi, Japan
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Awwww :-(

    I did that . . . but they still move. ;_;

  6. #6
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you be more specific. Which browser, where and exactly when. The reason I ask is cause I can't get them to move. Ever.
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  7. #7
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok I take it back. I think I found where you are talking about. I assume you mean when you enter the site and move the right side as far as it can go and it suddenly overlaps the girl. ??

    Your best bet may be to do a nested table. Making strict widths on the table cells. This will lock the table at a certain point. ...

    They also shift upwards as well. I think nested tables would help stop this.
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  8. #8
    SitePoint Enthusiast Lulabyte's Avatar
    Join Date
    Aug 2001
    Location
    Yamato-shi, Japan
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking Here you go . . .

    Yo --

    Here's the page I'm dilly-dalling with. Look at the HTML, I guess and tell me what's up. I use I.E. 6.0 if that helps.

    http://lulabyte.topcities.com/emwelcome.html

    Okay, first of all, TopCities (which is just a temp. thing) is really screwing it up because they put a banner up top that messes with the positioning of the layers. So, that kinda just CLEARLY shows my problem . . . hehe.

    Second, and now, for some reason, the banner gets big when you hover over it.

    Please Help

    -- Lu Lu

    < looks at the above post > Oh, that's not my site. That's what I WANT my site to be like. How it does the little layer thingy' and hers does't move, either.

    --- Ahhhhhh. Okay, now it's up at www.ethereal-me.com
    Last edited by Lulabyte; May 20, 2002 at 06:09.


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
  •