Re: FAQ: How do I make a pop-up menu in HTML?
From: Alan J. Flavell (flavell_at_ph.gla.ac.uk)
Date: 10/18/04
- Next message: bxb7668: "Re: Top posting"
- Previous message: Michele Dondi: "Re: regex to clean path"
- In reply to: Keith Keller: "Re: FAQ: How do I make a pop-up menu in HTML?"
- Next in thread: Keith Keller: "Re: FAQ: How do I make a pop-up menu in HTML?"
- Reply: Keith Keller: "Re: FAQ: How do I make a pop-up menu in HTML?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 18 Oct 2004 22:01:36 +0100
On Mon, 18 Oct 2004, Keith Keller wrote:
> It's probably called that because the corresponding CGI.pm method is
> called popup_menu. Perhaps an unfortunate choice, but remember that
> CGI.pm predates (IIRC) pop-up browser windows.
Fair comment
> popup_menu creates the equivalent of a drop-down list.
This is all quite OT (and IMNSHO only goes to illustrate that those
who accept off-topic answers rate to get the quality of response that
they deserve...), but if we're going to tackle it at all, then I think
it should be tackled accurately.
popup_menu creates a particular kind of HTML *selection list*
(specifically, one which has the "size" attribute set to 1).
As the HTML specification rightly points out:
Visual user agents are not required to present a SELECT element as a
list box; they may use any other mechanism, such as a drop-down menu.
http://www.w3.org/TR/html401/interact/forms.html#h-17.6
But it might be more informative if it pointed out that there's no
absolute requirement to present the form visually at all! So, what
would a "pop-up menu" (or "drop-down", for that matter) sound like on
a speaking browser?
Or to put it another way: it's entirely the business of the client
agent (browser etc.) to decide how to actually present a given
selection list. "popup menu", "dropdown list", "scrolling list" etc.
are no more than *proposals*, for the client agent to action or not
according to circumstances.
> As always perldoc CGI for more details.
That's a good general principle, indeed; but in this case
I'm sorry to have to say that you get better results by reading the
author's own HTML documentation[1]; versus the POD (and, even more
misleading, the HTML-ified POD) that gets distributed with Perl.
But whichever source of documentation you choose for the CGI.pm
module, the end result is an HTML document sent to the client.
One would find out more about the HTML and its properties and
limitations in another place, of course.
have fun
[1] http://stein.cshl.org/WWW/software/CGI/
Of course one *should* be reading the version of the documentation
that goes with the version of the module that one is using;
alternatively, install the version of the module that goes with the
version of the documentation that one is using ;-}
- Next message: bxb7668: "Re: Top posting"
- Previous message: Michele Dondi: "Re: regex to clean path"
- In reply to: Keith Keller: "Re: FAQ: How do I make a pop-up menu in HTML?"
- Next in thread: Keith Keller: "Re: FAQ: How do I make a pop-up menu in HTML?"
- Reply: Keith Keller: "Re: FAQ: How do I make a pop-up menu in HTML?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|