Website menus - is using Javascript a problem?

The place to discuss anything to do with computers, software, hardware, no matter how basic or technical. We all use this stuff, but we don't always understand it!
User avatar
linda147
Posts: 264
Joined: Tue Sep 05, 2006 4:03 pm
Location: Costa de la Luz, Spain
Contact:

Website menus - is using Javascript a problem?

Post by linda147 »

I am just make some improvements to my website at the moment. I wanted to have a navigation bar across the top of each page under the title, but I want to have a drop down from a couple of the items. The only way I have found to do this without paying for some software (seems a bit extreme when I only want one menu!) is to use javascript. Is this likely to cause people problems when they view my site or does everyone just enable it? Does anybody know a better way of creating a drop down menu for free? What I want is something like GasconyMagic has on his site - which I think looks really good.
Grateful for any advice.
Thanks.
e-richard
Posts: 5008
Joined: Sun Oct 17, 2004 11:33 am
Location: Algarve, Portugal
Contact:

Post by e-richard »

Linda,

You can achieve something similar with CSS. There are a number of examples, which you can copy and modify for FREE here.
User avatar
Alan Knighting
Posts: 4120
Joined: Mon Oct 18, 2004 7:26 am
Location: Monflanquin, Lot-et-Garonne, France

Post by Alan Knighting »

e-richard wrote:Linda,

You can achieve something similar with CSS. There are a number of examples, which you can copy and modify for FREE here.
Can image-free and JavaScript-free drop-down menus be created using CSS? I am sure they can but I am under the impression that they don’t work with Internet Explorer. Am I wrong?

Fluffy
User avatar
vrooje
Posts: 3202
Joined: Thu Dec 09, 2004 2:48 am
Location: Burgundy, France

Post by vrooje »

Linda,

Javascript is probably fine for the majority of users, but if in doubt you can always make the top part (the part that's visible before you hover) of your menu link to an intermediate page that shows normal links of your menu choices. That way even the rare person that has javascript disabled will be able to browse your site.
Brooke
User avatar
debk
Posts: 1053
Joined: Sat Sep 25, 2004 12:01 pm
Location: Lisbon, Portugal
Contact:

Post by debk »

I am sure they can but I am under the impression that they don’t work with Internet Explorer.
They are a bit tricky but they work! I have java-free CSS dropdowns on my website but I did have to add this bit of code to "help" IE recognize them.
<!--[if IE]>
<style type="text/css" media="screen">
body {
behavior: url("csshover.htc");
font-size: 100%;
}

#menu ul li {float: left; width: 100%;}
#menu ul li a {height: 1%;}

#menu a, #menu h6 {
font: normal 0.7em/1.4em arial, helvetica, sans-serif;
}
</style>
<![endif]-->
All of which I learned courtesy of google and a few search terms like "CSS dropdowns"

Good luck! :)
debk
e-richard
Posts: 5008
Joined: Sun Oct 17, 2004 11:33 am
Location: Algarve, Portugal
Contact:

Post by e-richard »

Thanks Deb, I knew there was some fiddle needed, but could not find it.

By the way, looking at your website in IE7 I do not see the dropdowns (Our Properties and Links), but I do in IE6 and Firefox, so maybe its even a bit more tricky than that :cry:
User avatar
linda147
Posts: 264
Joined: Tue Sep 05, 2006 4:03 pm
Location: Costa de la Luz, Spain
Contact:

Post by linda147 »

thanks for the advice - I can't find another way of creating menus for free (that I can understand and I teach ICT!)
I think I'll try the javascript menus and see what happens - they do look much better than what I have at the moment.
By the way Debk I can't see your drop downs either on your menu (I use IE7 as well).
User avatar
mpprh
Posts: 873
Joined: Tue Jun 14, 2005 6:07 am
Location: Languedoc, France
Contact:

Post by mpprh »

Hi

I've been looking at this for a while. My current navigation is CARP. But I was worried about SEO implications.

However, these days with Google sitemaps, html sitemap pages, and more reliance on content search it should not be a problem.

And the menu linking URL's are in the code.

So, I've played with the site suggested, and come up with this :
http://www.the-languedoc-page.com/test.htm

Not finished! Lots of work to do, but I'll probably use it.

I'd be very happy to hear from people who can't get it to work, giving details of connection speed, platform and browser info.


Peter
Last edited by mpprh on Wed Feb 14, 2007 9:11 pm, edited 1 time in total.
The Languedoc Page
www.the-languedoc-page.com
Image
e-richard
Posts: 5008
Joined: Sun Oct 17, 2004 11:33 am
Location: Algarve, Portugal
Contact:

Post by e-richard »

Very cool, Peter.

Works fine for me in IE7 on PC with WinXP at about 1mb broadband.

Only little thing I noticed was that all sub menus appear for a very short while at page load time. Do you also see this ?

I'll look closer at the code when I'm more refreshed and have the patience. Appreciate you putting it all in one file for testing :)
User avatar
mpprh
Posts: 873
Joined: Tue Jun 14, 2005 6:07 am
Location: Languedoc, France
Contact:

Post by mpprh »

Hi

Same thing happens for me in Firefox and IE6.

I'm not too upset. Those who are quick at least know where the menu is ?

Peter
The Languedoc Page
www.the-languedoc-page.com
Image
e-richard
Posts: 5008
Joined: Sun Oct 17, 2004 11:33 am
Location: Algarve, Portugal
Contact:

Post by e-richard »

Of course.... its a feature, not a bug :wink:
User avatar
debk
Posts: 1053
Joined: Sat Sep 25, 2004 12:01 pm
Location: Lisbon, Portugal
Contact:

Post by debk »

Thanks, all. I didn't know about the IE7 problems. (Was refusing to download it myself but looks like I've got to know on at least one PC. Sigh...)

If you don't mind, I'll tweak and bit and ask for some worldwide testing later.

Thanks again! :)
debk
User avatar
debk
Posts: 1053
Joined: Sat Sep 25, 2004 12:01 pm
Location: Lisbon, Portugal
Contact:

Post by debk »

Anyone around this lovely Valentine's evening and willing to see if these dropdowns (eg, Links&Blog -or- Properties) now work with IE7?

http://visitingportugal.com/index-old.html

Thanks!
debk
User avatar
mpprh
Posts: 873
Joined: Tue Jun 14, 2005 6:07 am
Location: Languedoc, France
Contact:

Post by mpprh »

Hi

works fine for me with Firefox 2.0.0.1 / XP

But IE6 makes the boxes bigger, and two overflow to the second line. with text size plus grande (larger ?) .This then gets confused with overlapping drop down contents.

It just fits with text size set to normal (actually mine says moyenne).

Peter
The Languedoc Page
www.the-languedoc-page.com
Image
User avatar
debk
Posts: 1053
Joined: Sat Sep 25, 2004 12:01 pm
Location: Lisbon, Portugal
Contact:

Post by debk »

Hi, Peter - Thanks!

Yes, I know about the large text overlap... but I can't abide those tiny text websites and opted to have larger text in general. (Besides, if someone needs extra large text on my already good-sized-text site then they probably won't be able to navigate the stairs either. :) )

Did you happen to try with IE7?

Again, thanks for the detailed feedback. Much appreciated.
debk
Post Reply