[thelist] Netscape 4.7 lies ! (what else is new?)

seb potter seb at members.evolt.org
Fri Jan 10 04:23:01 CST 2003


> always is alittle strong language.  sure, if you're talking about js-enabled
> clients, then always would probably be a true statement.  however, clients
> that either don't support javascript or have it disabled will be in for a
> rough ride.  unfortunately for them, the hidden field will never get set and
> they'll end up getting the form over and over again as if they changed one
> of the select fields.  obviously that's not a very attractive situation for
> non-javascript clients.
>
> not sure what the solution is though, unfortunately.

Oops. There's that "figure of speech" thing getting in the way of my
meaning again. You're right, Jeff, always is a strong word to use.

Allow me to reformulate, and also to enhance my proposal:

Have a variable on the form in plain html that is a flag to say that a
non-js client has submitted the form using the submit button.

Add an onclick handler to the submit button so that you can catch the
js-enabled NS4.7 submission event. This changes the value of your flag
field.

Add an onsubmit handler that catches all other js-enabled clients. This
handler will change the flag field to a different value.

Then you just need to check flag value that gets sent in the
request.form, and act appropriately. Not guaranteed foolproof, but
should be slightly more robust than my first suggestion, and deals with
the non-js clients. (Thanks for the reminder Jeff. That'll teach me to
read thelist at 4am.)

<tip author="seb">
Measure twice, cut once.
</tip>

- seb

--
seb can be found at http://poked.org



More information about the thelist mailing list