Topic awaiting preservation: form validation issue (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 02-28-2005 18:59
For some reason, I can't seem to get this to work in Firefox 1.01. It appears to work fine in IE 6.0SP1 code: function checkme(){
code: <form method="post" action="/send.php" name="email" onsubmit="return checkme();">
|
Paranoid (IV) Mad Librarian From: Glienicke |
posted 02-28-2005 20:19
I can't say that I'm seeing anything that doesn't look right in your code, but maybe you could just give another approach a try if Firefox doesn't like this one. For example, instead of returning false or true depending on what the fields contain, try setting the form's action to "javascript:void(0)" or "/send.php". Who knows, it might just do it... |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 02-28-2005 20:52 |
Paranoid (IV) Mad Librarian From: Glienicke |
posted 02-28-2005 21:10
Completely untested... let me know if it doesn't work: code: function checkme(){
code: <form method="post" action="/send.php" name="email" onsubmit="checkme();">
|
Bipolar (III) Inmate From: Minnesota |
posted 02-28-2005 21:14
Oddly enough, it seems that the / in /send.php is what is stopping it from working. I was playing with it a bit and when i took out the / it seems to work. |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 02-28-2005 21:50 |
Paranoid (IV) Mad Librarian From: Glienicke |
posted 02-28-2005 22:25
Seriously?? Too strange. |
Bipolar (III) Inmate From: Minnesota |
posted 02-28-2005 22:40
Yours doesn't work unless you take the slash out. |
Nervous Wreck (II) Inmate From: UK |
posted 02-28-2005 23:26
If you're just testing it from a local file, the URL it's posting to isn't an HTTP URL, and the HTML spec says that user agent behavior for a value other than an HTTP URI is undefined. Which means that it's perfectly legal for a browser to refuse to submit the form, or submit it anyway, or turn into a chicken, or... whatever. |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 03-01-2005 02:41
Ah - that makes sense. I've used a leading backslash before and it worked fine. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 03-01-2005 03:37
It is but it's a relative URI. Technically it's the HTTP bit of the specification (not the URI bit) that is breaking I guess. |