following is my code working well in chrome.
<body>
<a href="javascript: sam.save();">hehe</a>
<script>
var sam = {
save : function()
{
alert("here")
return false;
}
}
</script>
when in run in firefox the page redirects and false is displayed on the screen with the adress bar content like in the picture
firefox version is 9.0.1
suggestions and circumvents please...
Web Developers use 'return false' in different ways. During form submission, if a particular entry is unfilled, return false is used to prevent the submission of the form.
Chosen solution You can open the about:config page via the location/address bar. You can click the button to "Accept the Risk and Continue".
For some reason return false doesn't work in FF inside href="javascript:", but void(0) does.
<a href="javascript: sam.save();void(0);">hehe</a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With