apache error

Deryck Hodge deryck at samba.org
Tue Sep 14 11:07:18 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Brewer wrote:
|
| Try changing href="" to href="http://www.google.com" and I think you'll
| see you aren't canceling the hyperlink. Even though your onclick event
| may be fired, the hyperlink is still being invoked. Since you left href
| blank, it assumes you want the default page of the root directory, in
| your case, /cgi-bin/, and takes you there. Or tries to. Try this
| instead:
|
| <th class='head'><a href="javascript:void(sortTable(0))">Rank</a></th>
|

Hi, all.  I've just started on this list, as I'm learning a little
Python.  I do, however, do a good bit of Javascript work and thought I
would point out something here that's not so obvious if you don't do a
lot of Javascript.

If you set links to call a Javascript function as in the example above,
if Javascript is not enabled, the link will go nowhere.  This may not
bother you the designer, but a user may not know they have javascript
disabled or may be unfamiliar with website conventions.

An easy fix for this, is to specify an actual page (perhaps a page that
says "Sorry, you do not have javascript enabled") and add a return false
attribute.  For example:

<th class='head'><a href="js_disabled.html" onclick="sortTable(0);
return false">Rank</a></th>.

If Javascript is enabled, the link will not call the href, but if it is,
then the user gets a message telling them what went wrong.  Sorry to
derail the Python list for this.

- --deryck

- ----------------------------------------------------------------------
Deryck Hodge                               http://www.devurandom.org/
Cataloging Department                      http://www.lib.auburn.edu/
Web Editor, Samba Team                          http://www.samba.org/
GnuPG Key                    http://www.devurandom.org/gpg_pubkey.asc

I am flawed but I am cleaning up so well.
- --Dashboard Confessional, from "Vindicated"(2004)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBRwkm4glRK0DaE8gRAjH3AKC/Cr9XWppknuCk66o8jGTsq7JxcACfbeDA
Q3jDXFEdgqRkF7OQDBQ1xkY=
=xeKZ
-----END PGP SIGNATURE-----



More information about the Python-list mailing list