Chad Lupkes wrote:
Quote:
I'm getting an error in the validator from htmlhelp.com that I need a
little help with. It is telling me that the action property of the
following form is missing, and I'm not sure which action I should use. |
That is really the least of your worries. You should be more concerned
that you are using a pure-JavaScript navigation system -- something that
is inaccessible to about 5%-15% of your potential users, including one
very important one: Googlebot.
The correct way to provide links to other parts of your site is via the
humble <a> element. For example:
<a href="anotherpage.html">Another Page</a>
This will work fine in non-JS browsers and search engines.
If you really want a drop-down menu, then use server side redirection:
<form action="redir.php" method="get">
<select name="x">
<option value="http://www.yahoo.com/">Yahoo</a>
</select>
</form>
Where redir.php is a server-side script on your server that checks the
value of x and redirects the user there. This technique can be combined
with your current method to provide a speedier JavaScript-based
redirection for those whose browsers support it, but provide a fallback
through redir.php for everyone else.
As I said, this still won't let search engines spider your site properly,
so your best bet is to use proper <a> elements.
--
Toby A Inkster BSc (Hons) ARCS | mailto:tobyink (AT) goddamn (DOT) co.uk | pgp:0x6A2A7D39
aim:inka80 | icq:6622880 | yahoo:tobyink | jabber:tai (AT) jabber (DOT) linux.it
http://www.goddamn.co.uk/tobyink/ | "You've got spam!"
playing://(nothing)