[OT] Question on javascript
Stephen Woodbridge
woodbri at SWOODBRIDGE.COM
Sat May 28 11:15:22 PDT 2005
Hi,
This is a little of topic, but it is related to building a web interface
for mapserver.
I have form in html that I do NOT want to submit.
http://swoodbridge.com/~woodbri/t.html
enter text in location and hit [enter], the form starts a submit and
calls nosubmit() which puts up an alert and then return false; which
should cancel the submit. But it does the submit anyway :(
This is really annoying because I figure I'm doing something stupid, but
I just don't see it.
Any help would be appreciated.
-Steve W.
the html is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Submit Test</title>
<script type="text/javascript">
function nosubmit()
{
alert('nosubmit');
return false;
}
</script>
</head>
<body>
<form onsubmit="nosubmit();">
Location: <input type="text" name="address" size="40">
<input type="button" value="Go" onclick="alert('hello')">
</form>
</body>
</html>
More information about the MapServer-users
mailing list