Click to See Complete Forum and Search --> : Drop-down Menu


edwardobrien
05-04-2003, 03:53 AM
I'm a new user of this forum with only limited experience at web building.

I am looking for a script for a drop-down menu where a visitor clicks the down arrow to select any of nearly 200 (yes 200)! links to a page on my website. They are countries of the world. The visitor is then taken to that country's page.

I have searched everywhere but may be looking in the wrong places.

Any help will be greatly appreciated

Charles
05-04-2003, 05:47 AM
There are a couple of ways to accomplish this. Which one that you use will depend upon what yuo are doing to ensure that your page still works for the one in ten usere that do not use JavaScript.

edwardobrien
05-04-2003, 06:02 AM
I have no Javascript on the site just yet, but would obviously like to reach as many people as possible.

That said, I want the better method. If you can help me with both options so that I can try them out, I will be eternally grateful...

Charles
05-04-2003, 06:05 AM
The best method is to do the whiole thing server side. Does your server support Perl?

edwardobrien
05-04-2003, 11:07 AM
I don't know, Charles. I think all that is going to be over my head.

It will be better if I stick to Javascript. 90% coverage is pretty good and will no doubt be getting better.

Thanks for your patience.

Charles
05-04-2003, 12:36 PM
Originally posted by edwardobrien
coverage is pretty good and will no doubt be getting better. If it will change at all then you can expect the coverage to go down. JavaScript is incompatable with the browsers that some people with disabilities use. Hence the admonition that you [e]nsure that pages are usable when scripts, applets, or other programmatic objects are turned off or not supported.
http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-scripts And be careful. Relying upon JavaScript can run you afoul of disability laws in some places such as the USA. This doesn't mean that you cannot use JavaScript but only that you cannot rely upon it. If you cannot or will not do the drop down navigation thing server side then you will need some kind of alernative navigation present for the JavaScript free. And if that is over your head then you ought not to be making web pages I'm afraid to say.

edwardobrien
05-04-2003, 03:34 PM
Tactfully put, and thank you, Charles. Perhaps you can tell me how I go about setting up such a drop-down menu server side.

Charles
05-04-2003, 03:50 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<form action="cgi-bin/url.pl">
<div>
<select name="url">
<option value="http://www.w3.org/TR/REC-html32">HTML 3.2</option>
<option value="http://www.w3.org/TR/html4/">HTML 4.01</option>
<option value="http://www.w3.org/TR/xhtml1/">XHTML 1.0</option>
<option value="http://www.w3.org/TR/xhtml11/">XHTML 1.1</option>
<option value="http://www.w3.org/TR/xhtml2/">XHTML 2.0</option>
</select>
<input type="submit">
<div>
</form>

The particulars will change depending upon the way your server is set up, but the script in Perl would look something like...

#!usr/local/bin/perl
use CGI qw(redirect param);
print redirect param url;

edwardobrien
05-04-2003, 05:16 PM
Thank you, Charles. I will be using this and hope very much that I can get it going. Hopefully then, any and all browsers will be able to use it.

Thanks also for your patience.

hungry
05-05-2003, 03:42 AM
can anyone please help me?? i am trying to create a drop down menu. when u mouse over the main topic, there will be a list of sub topic below it.

edwardobrien
05-05-2003, 05:02 AM
I think they call it "Cascading" with 'mouseover'. There are several scripts for copying at www.javascript.internet.com

If you have no luck, I suggest you post a "New Thread".

Sorry I can't be more helpful than that.