Linked Questions

420 questions linked to/from event.preventDefault() vs. return false
43 votes
1 answer
15k views

$("a.avatar").click(function(e){ e.preventDefault(); $("#thumbnails").fadeIn(); }); and $("a.avatar").click(function(e){ $("#thumbnails").fadeIn(); return false; }...
user198729's user avatar
5 votes
2 answers
28k views

This is my current solution: html <input type="checkbox" value="1" onclick="return do_stuff();" /> <input type="checkbox" value="1" onclick="return do_stuff2();" /> javscript: function ...
8 votes
3 answers
10k views

Possible Duplicate: event.preventDefault() vs. return false I'm not sure, but as far as I see, event.preventDefault is coming from jQuery. if yes, I'm wondering is there any native equivalent in ...
Mahdi's user avatar
  • 9,447
9 votes
2 answers
2k views

I have tried preventDefault() for submiting the form without page reload but its not giving any result to me. Can anyone explain what is the purpose of preventDefault() method in JQuery???
4 votes
3 answers
2k views

I searched for a similar question and someone claimed that return false is similar to event.stopPropagation() and event.preventDefault(), but I have tried the claimed examples and it doesn't work. The ...
5 votes
1 answer
2k views

jQuery documentation states: "When utilizing both .preventDefault() and .stopPropagation() simultaneously, you can instead return false to achieve both in a more concise manner..." This is in regard ...
Robert's user avatar
  • 10.4k
3 votes
1 answer
653 views

In my project, I use Python Flask working as the server side and JS as the front end. The project allows user to select a photo and send the photo to the server side with AJAX post method. And server ...
Chris Bao's user avatar
  • 2,948
2 votes
1 answer
382 views

What is difference between return false; and e.preventDefault(); ?
SGh's user avatar
  • 137
0 votes
2 answers
371 views

I have a drop down- If user tries to submit the page, but doesn't choose an option from the dropdown, then I want an ALERT message box to appear, then for the page to stay where it is instead of ...
2 votes
4 answers
221 views

after submitting a form to email i get 2 email instead 1 how can i fix it? I need that only 1 letter come to email js: app.controller('threeCtrl',function($scope){ $("#subBusinessOne").click(...
dmitriy's user avatar
  • 488
2 votes
1 answer
196 views

Possible Duplicate: JavaScript: event.preventDefault() vs return false What are the cases when return false does not do the same thing as e.preventDefault() ? (Note I'm not talking about jQuery events....
Name's user avatar
  • 771
-1 votes
1 answer
77 views

Html: <input type="text" onkeypress="return isNumberKey(evt)" /> JavaScript: function isNumberKey(evt) { var charCode = (evt.which) ? evt.which : evt.keyCode; if (...
Toha's user avatar
  • 5
0 votes
1 answer
48 views

I have an input submit, after attaching an onclick handler on it, what's the standard way to prevent a post request to "form action=xxx" url? Is it "return false", or "e.preventDefault", or "e....
user avatar
429 votes
30 answers
1.2m views

Although that link is disabled, it's still clickable. <a href="/" disabled="disabled">123n</a> Can I make it not-clickable if it's disabled? Should I use JavaScript necessarily?
442 votes
16 answers
372k views

How do I go about binding a function to left and right arrow keys in Javascript and/or jQuery? I looked at the js-hotkey plugin for jQuery (wraps the built-in bind function to add an argument to ...

15 30 50 per page
1
2 3 4 5
...
28