Closed Bug 1076790 Opened 10 years ago Closed 10 years ago

event.returnValue = false doesn't work

Categories

(Firefox :: Untriaged, defect)

30 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: cakkavati.kusuma, Unassigned)

References

()

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 Build ID: 20140605174243 Steps to reproduce: I tried the codes from this site : http://www.sanwebe.com/2012/09/ajax-multiple-image-upload-resize-with-jquery-and-php Actual results: The javascript can't run. I have test it in other browser and can run properly. Expected results: I can see some input file.
Severity: normal → critical
Provide a simple testcase to attach to the bug, please.
Severity: critical → normal
Flags: needinfo?(cakkavati.kusuma)
I see the "ReferenceError: event is not defined ajax-multi-image-upload-progressbar:27" in console when click the "Add More Files". I think he was referring to above.
Flags: needinfo?(cakkavati.kusuma)
The error is in: $("#AddMoreFileBox").click(function () { event.returnValue = false; } "event.returnValue = false" is deprecated and the demo is using an old version of jQuery (1.10.2). I guess updating jQuery should be enough or changing the part of code by: $("#AddMoreFileBox").click(function (event) { event.returnValue = false; } or $("#AddMoreFileBox").click(function (event) { event.preventDefault(); } * http://stackoverflow.com/questions/17712796/both-event-preventdefault-and-event-returnvalue-false-dont-work-in-firefox * http://stackoverflow.com/questions/20045162/event-returnvalue-is-deprecated-please-use-the-standard-event-preventdefault
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
Summary: javascript problem → event.returnValue = false doesn't work
Depends on: 1452569
You need to log in before you can comment on or make changes to this bug.