• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 570
  • Last Modified:

Help with Javascript menu in classic asp application

Hi Guys

I have a menu which has worked fine in previous applications. There is a bit of code involved in this so I have put the html, javascript and css in JSBin at http://jsbin.com/oSAjoWa/1/edit

The main problem I am experiencing is that the dropdown menu under "Calendar Views" does not dropdown -

My main problem is an error being returned on the SetBttnStyle function - the error in JSBin seems to be that the object has no method - I am not good with javascript so I have no idea what this means.

I would be grateful if someone can point out what the rror mean and how to fix it, with commenting in the code so I understand.


  • 3
  • 2
3 Solutions
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
To start, please paste your code into the validator http://validator.w3.org/  There are a lot of errors and it is possible something there is preventing it from working. I wouldn't go further until that is cleaned up.

Next, are you sure the drop down is supposed to be table's and rows and not an unordered list?  Where did you get this code from to compare?
dwe0608Author Commented:
Hi Padas,

this code was extracted from a script I obtained many years ago, which I still use today - I ported it across from an old app - the original source that I obtained it from is sadly, as almost usual these days - long gone - so I cant go back and compare - I have considered renewing the scripts to something similar to this = http://jsbin.com/OLaFERi/1/ which is an unordered list and relatively uncomplicated ... what do you think ?
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Yes, I think that is much better in the long run.
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

I have used that EXACT (the one referenced in the link above) same script in some of my projects.
It is okay, but I have evlved to using pure CSS for drop-downs now.  It's much more fluid, and still works if your user does not have JS enabled.
May want to consider moving away from JS for menus.

try Googling "pure css dropdown menu tutorial"
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
It is a bit older.  I think you can run into some issues with mobile with pure css.  I am to the point where most new sites uses http://getbootstrap.com/ or http://foundation.zurb.com/ as a base and I use the core nav function there.


You don't want or need to use the default "look" and you can make your own. But the core of how it works is good.  

Also note that the newest version of bootstrap lost the ability for nested sub menu navigation because mobile would not be able to deal with it easily.    Even if you use something else, think about that.  Easily 40% to 50% of your users now are mobile or touch screen.
dwe0608Author Commented:
Thanks for the input guys
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now