[thelist] Netscape Bugginess

.jeff jeff at members.evolt.org
Tue Oct 15 17:19:01 CDT 2002


> From: Stephen Caudill
> Can someone kindly explain to me why Netscape (4.x
> likes the image map but not the select box; 6.x and
> up dont like either) will not play nicely with my
> carefully crafted javascript on this page...
> http://neohero.municode.com/munitest/Resources/online_codes.asp

first, your option reference isn't written correctly.  some browsers (as you've discovered) will let you get away with the shortcut you've used, but it's not supported by all.



to (all on one line):


second, put some server-side script in place to handle the form for users with javascript enabled.  perhaps it'd be as simple as making the action the same as your "loca" variable and setting the form method to "get".  put a target on the <form> tag so it'll put the results in a new window.  for javascript users, simply pop a window upon submit with the same name as the target attribute value.  now everyone's happy cause they can access the information.

third, <map> tags belong in the <head> of the document and nowhere else.

fourth, i could just slap you for doing this:

href="javascript:void(0)" onClick="window.open(loca+'5', 'newwindow', props)"

ok, i don't actually wanna slap you, but i'm sure there are some blind users or non-javascript users who wouldn't mind.  you're castrating this functionality unnecessarily.  try something like this instead:

onclick="window.open(this.href, 'newwindow', props); return false"

finally, give these two articles a read:

Links & JavaScript Living Together in Harmony

Forms & JavaScript Living Together in Harmony



jeff at members.evolt.org

More information about the thelist mailing list