HTML and CSS Reference
In-Depth Information
transmission from the browser after the URLsomething you can't
do as part of a conventional
<a>
tag.
9.2.4.2. Passing parameters explicitly
The foregoing bit of advice warrants some explanation. Suppose you
had a simple form with two elements named
x
and
y
. The browser en-
codes them like this:
x=27&y=33
If
method=GET
, the browser also includes the server-side's processing ap-
plication's URL as a prefix, like this:
http://www.kumquat.com/cgi-bin/update?x=27&y=33
There is nothing to keep you from creating a conventional
<a>
tag that
invokes the form with any parameter value you desire, like so:
<a href="http://www.kumquat.com/cgi-bin/update?x=19&y=104">
The only hitch is that the ampersand that separates the parameters is
also the character-entity insertion character. When placed within the
href
attribute of the
<a>
tag, the ampersand causes the browser to re-
place the characters following it with a corresponding character entity.
To keep this from happening, you must replace the literal ampersand
this substitution, our example of the alternative form reference to the
server-side application looks like this:
<a href="http://www.kumquat.com/cgi-bin/update?x=19&y=104">