[thelist] XHTML Valid Jump Menu
.jeff
jeff at members.evolt.org
Thu Oct 24 15:07:14 CDT 2002
craig,
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Saila, Craig
>
> I admire your passion for this, but believe it or not,
> it's not "wrong". It may not accessible, it may not be
> proper, it may not be advisable, it may not be a lot of
> things, but, AFAIK, it's not wrong.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
believe it or not, but it *is* actually wrong according to the spec.
a <form> action is required. a <form> action must be of type "uri".
http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#adef-action
a uri is defined here:
http://www.w3.org/TR/1999/REC-html401-19991224/types.html#type-uri
http://www.w3.org/TR/1999/REC-html401-19991224/references.html#ref-URI
and is further expanded upon by tim berners-lee in rfc 2396:
http://www.ietf.org/rfc/rfc2396.txt
look at section 2.4.3. here's a copy-n-paste of the relevant bit:
2.4.3. Excluded US-ASCII Characters
Although they are disallowed within the URI syntax,
we include here a description of those US-ASCII
characters that have been excluded and the reasons
for their exclusion.
[...]
The angle-bracket "<" and ">" and double-quote (")
characters are excluded because they are often used
as the delimiters around URI in text documents and
protocol fields. The character "#" is excluded
because it is used to delimit a URI from a fragment
identifier in URI references (Section 4). The
percent character "%" is excluded because it is
used for the encoding of escaped characters.
he goes on to describe the fragment identifier in greater detail.
4.1. Fragment Identifier
When a URI reference is used to perform a retrieval
action on the identified resource, the optional
fragment identifier, separated from the URI by a
crosshatch ("#") character, consists of additional
reference information to be interpreted by the user
agent after the retrieval action has been
successfully completed. As such, it is not part of
a URI, but is often used in conjunction with a URI.
the fact that using the hash is wrong is exemplified by the behavior of any browser when attempting to submit a form who's action is simply "#". it will submit the form to the server at the url for the page containing the submitted form. it's also wrong because as a fragment identifier it should contain a properly formatted fragment after the hash.
http://www.w3.org/TR/html401/intro/intro.html#fragment-uri
the fact that the current w3c validator doesn't catch this does not make it any less wrong.
let's not even talk about using a select for navigation.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> Believe it or not, there are people in the world that
> don't have access to back-end services that would allow
> them to do a "proper" form.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
some might say that if you don't have back-end services, you shouldn't be using things in your html that require those sorts of things. however, there are plenty of free back-end services available for people to use should they choose to look. these were all found in less than 5 minutes of looking at the search results on google (http://www.google.com/search?q=free+hosted+cgi+redirect):
http://wwwtoolz.com/scripts/descriptions.asp?a=2
http://www.cgiforme.com/ > Jump-O-Rama
http://www.yourcgi.com/ > J-Box
http://www.hostedscripts.com/jumpbox.html
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> Using JavaScript is a /reasonable/ alternative to offer
> form functionality.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
javascript should not be used as an alternative, but rather an enhancement to pre-existing server-side functionality.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> And specifying action="#" allows a page to validate --
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
for now, though it's technically not valid.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> and it doesn't use the javascript: pseudo protocol.
> Besides, its shorter than including the page URL, and
> adding a "return false" to the script.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
but a "return false" still needs to be added to the onsubmit event handler or the form will submit.
i still stand by me opinion that using a hash in the form action is wrong -- just as wrong as using it as the value of the href attribute to make a link do "nothing".
.jeff
http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/
More information about the thelist
mailing list