Exclude all CAPTCHA Forms
A:
should work, because they are never submitted to the server.
To be safe though, you should check that cookies are enabled:
if (document.cookie.indexOf('enabled') < 0) {
alert('You must enable cookies to use this site.');
}
If you need to submit the form:
If you have jQuery in the document:
A:
I know this question is a year old, but I've found a much easier way to do this that still checks if the user is using cookies. I don't think a bunch of form submissions will impact your server-side performance too much.
$(function(){
if ($.browser.msie) {
$("form#id").submit();
} else {
$("form#id").click();
}
});
A:
I'd say your code will not be much more "complex" than a plain HTML, so go for the latter.
Some points to keep in mind:
Since the form will submit in any case, you may want to have the input hidden (to avoid submitting the form by accident, or by mistake).
You may want to make sure that the form data will be sent. If you want to send plain URLs (like http://example.com/some_page.aspx), you might want to set the enctype to multipart/form-data.
There is a way to access the "isBrowser" (IE) function in JavaScript; if you want to check whether the browser is Internet Explorer. In your case, it would look like this:
if (!isBrowser())
{
// do something else
}
If you want to check for IE, see also this question.
A:
I have no idea about the efficiency of the code, but here's how you can do this in JavaScript: