[jQuery] [Tooltip] Cancelling a submit isn't possible
Hi Jörn and others,
Since I started using jquery.tooltip, I discovered that it is
impossible to cancel a submit. The problem only occurs in Firefox.
Below I have created a simple example, just copy the code into an
empty html-page and put it in the same directory of jquery,
jquery.tooltip and jquery.dimensions.
If the second submit button is clicked the submit should be cancelled,
and in Internet Explorer it does but not in Firefox.
When the $('input').tooltip() is changed to $('a').tooltip() or
removed, the problem doesn't occur.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>jQuery OnClick Demo</title>
<script language="javascript" type="text/javascript"
src="jquery.js"></script>
<script language="javascript" type="text/javascript"
src="jquery.dimensions.js"></script>
<script language="javascript" type="text/javascript"
src="jquery.tooltip.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function(){
$('input').tooltip({
delay: 0,
showURL: false
});
});
</script>
</head>
<body>
<div id="container">
<form method="get" id="aspnetForm">
My name is: <input type="text" id="txtName" name="name" />
<input type="submit" id="btnName1" value="Submit"> <span>(no
event)</span>
<input type="submit" id="btnName2" value="Submit"
onclick="return false;"> <span>(onclick="return false;")</span>
</form>
</div>
</body>
</html>
Can this problem be solved? Does anyone know the cause?
I really want to use jquery.tooltip on all my controls so the layout
is the same.
Kind regards,
Jochen