Closed Bug 309736 Opened 19 years ago Closed 16 years ago

location.href to relative page not work after calling FSCommand from Flash, but work in IE

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: steve.tse, Unassigned)

References

()

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0(Windows; U; Windows NT 5.1;zh-TW;rv:1.7.10) Gecko/20050717 Firefox/1.0.6

I have a Flash 7.0.19.0 with FSCommand embedded into HTML page with calling a 
javascript function as follows:
function test_DoFSCommand(command, args) {
  if ( command=="Test" ) { 
    alert("forward to test2.html");
	location.href="test2.html";
  }
}

It fails to forward to the page test2.html in Firefox, but it works in IE.

I found that it works in Firefox by using absolute path (i.e. 
location.href="http://www.charmtop.com.hk/testcase/test2.html")



Reproducible: Always

Steps to Reproduce:
1. go to http://www.charmtop.com.hk/testcase/test.html
2. push the button "Push Button"
3.

Actual Results:  
Fail to forward to the page "test2.html".  In Javascript console, it 
shows "Access to 'resource://gre/res/test2.html' from script denied"

Expected Results:  
Forward to the page "test2.html" with the word "Success" being seen.
From the JS console:

Error: [Exception... "'Permission denied to get property XULElement.disabled'
when calling method: [nsIDOMXULControlElement::disabled]"  nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)"  location: "JS frame ::
http://www.charmtop.com.hk/testcase/test.html :: test_DoFSCommand :: line 12" 
data: no]
Source File: http://www.charmtop.com.hk/testcase/test.html
Line: 12

Security Error: Content at http://www.charmtop.com.hk/testcase/test.html may not
load or link to resource://gre/res/test2.html.

Error: Access to 'resource://gre/res/test2.html' from script denied
Source File: http://www.charmtop.com.hk/testcase/test.html
Line: 13
forward fine - WFM current trunk
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.