Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7

Thread: dropdown menu

  1. #1
    Member nepharo's Avatar
    Join Date
    Jun 2003
    Posts
    73
    Member #
    1729
    I'm a php developer that's starting to use Javascript.
    (I know the basics: syntax, etc)
    I'm trying to make a drop down menu. Basically, on rollover the appears, on rollout the menu dissapears. I'm sure you guys have seen
    it before in sites like microsoft.com.
    I sort of had it, but the user had to click on it to make if appear, and click on it to make it dissapear. Oviously that's no good. I also know that I have to use CSS. I'm confortable with that.
    I'm been trying to find a good tutorial on the web, but I haven't found one that's decent.
    Can you guys help moi.

    -nepharo
    I cannot self terminate, you must lower me into the fire.

  2.  

  3. #2
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    you can have a look at this if you want
    JR

  4. #3
    Member nepharo's Avatar
    Join Date
    Jun 2003
    Posts
    73
    Member #
    1729
    I'm currently examining the source code.
    I'll let you know how it turns out.
    by the way, did you do this?
    I cannot self terminate, you must lower me into the fire.

  5. #4
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    yes,

    feel free to take it
    JR

  6. #5
    Member nepharo's Avatar
    Join Date
    Jun 2003
    Posts
    73
    Member #
    1729
    I really apreciate your help, jr. I spend all day yesterday studying the code to make sure that I understood everything. This is exactly what I was looking for.
    You know, sometimes it is useful when someone other that the author looks at the code because they might be able to see things that the author happened to overlook. If you don't mind, I can comment on one or two minor optimizations that you can do to your code.

    thanks again
    -nepharo
    I cannot self terminate, you must lower me into the fire.

  7. #6
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    yeah that would be good thanks...

    i know it is only IE, but i will work on it soon to make it cross browser
    JR

  8. #7
    Member nepharo's Avatar
    Join Date
    Jun 2003
    Posts
    73
    Member #
    1729
    Sorry I took so long to reply. I was very busy.
    Anyways. I don't remember how many "optimizations" I had, this is the only once I can remember:
    this:
    function navroll(cellid, classname, state) {
    if (state == 'on') document.getElementById(cellid).className = classname;
    if (state == 'off') document.getElementById(cellid).className = classname;
    }

    equals this:
    function navroll(cellid, classname)
    {
    document.getElementById(cellid).className = classname;
    }

    you don't need the third parameter(as the function stands). You can get rid of the third and the if's.

    once again, thanks for your help
    I cannot self terminate, you must lower me into the fire.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:43 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com