Forum Moderators: open
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps TEST</title>
<script type="text/javascript" src="/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="/jquery.form.js"></script>
<script type="text/javascript" src="/jquery.gmap-1.1.0.js"></script>
<script type="text/javascript">
// prepare the form when the DOM is ready
$(document).ready(function() {
// bind form using ajaxForm
$('#htmlForm').ajaxForm({
// target identifies the element(s) to update with the server response
target: '#htmlExampleTarget',
// success identifies the function to invoke when the server response
// has been received; here we apply a fade-in effect to the new content
success: function() {
$('#htmlExampleTarget').fadeIn('slow');
}
});
});
</script>
</head>
<form id="htmlForm" action="html-echo.php" method="POST">
Message: <input type="text" name="message" onKeyUp="if(this.value.length>4)htmlForm.submit()">
</form>
<div id="htmlExampleTarget"><div>
</body>
</html>
<html>
<head>
</head>
<body>
<form action="#" onsubmit="return foo();">
<input type="button" value="click me" onclick="this.form.submit();">
</form>
<script>
function foo() {
alert('foo');
return false;
}
</script>
</body>
</html>
onKeyUp="if(this.value.length>4)$('#htmlForm').submit()"