Closed Bug 556963 Opened 14 years ago Closed 14 years ago

href="javascript:function();" Will No Longer Work, href="#" onclick="function();" Works

Categories

(Firefox :: General, defect)

3.6 Branch
x86
macOS
defect
Not set
critical

Tracking

()

RESOLVED INVALID

People

(Reporter: lifeCoder45, Unassigned)

Details

(Whiteboard: [bugday0504])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.7 Safari/533.2
Build Identifier: 3.6.3

Since the 3.6.3 update, a coworker and I have suddenly lost the ability to use href="javascript:function();" links to trigger javascript functions. It just loads a new page that says false.

Reproducible: Always

Steps to Reproduce:
1. Create an html link. 
2. Point the href attr at a custom function
3. ex. <a href="javascript:removeWeight('3');">Remove</a>
4. function Declaration: function removeWeight(which){ alert(which); }
Actual Results:  
Acts as if a form has been posted and loads a new page, with the browser url set at "javascript:removeWeight('1');". the page source is empty, but the page says "false"

Expected Results:  
Alerted the number '3'

This has only happened following the recent upgrade. Chrome and safari run fine, and firefox has up to today. I mark it as severe because a LOT of webapps all over are going to be broken now.
Version: unspecified → 3.6 Branch
I can't reproduce the problem with the testcase I attached. Can you try to reproduce please?
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Here's the UA string I tested with: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) XPCOMViewer/0.9.2
Whiteboard: [bugday0504]
As this is a Mac only bug, and I tested on Win Vista, I'll change the resolution back to UNCO. Someone with a Mac should reproduce.
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
I cannot reproduce it with the demo you've provided, or a stripped down version I threw together. It must me something else on the two sites I have it popping up on. Thank you very much for your consideration.

- Josh
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: