HTML & XHTML

From Elvanör's Technical Wiki
Revision as of 10:21, 15 February 2007 by Elvanor (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Various important things I noticed when writing HTML code.

Forms

If you use the GET method on a form, on the action URL, don't give an URL already containing variables encode in GET style. The browser will just rebuild the URL when you submit the form, and thus the variables will be ignored. Eg, something like:

<form action="myurl.html?myVariable=yes&myCounter=3" method="GET"><button type="submit></button></form>

won't work. If you want to pass variables and use a GET method, just create hidden input fields.