setting a relative location to an iframe in JavaScript points to chrome:// not to real path

RESOLVED DUPLICATE of bug 233733

Status

()

Firefox
General
RESOLVED DUPLICATE of bug 233733
15 years ago
15 years ago

People

(Reporter: pachollini, Assigned: Blake Ross)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

15 years ago
User-Agent:       
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

I've got this JavaScript code:

if(!frames["vrstva"+vrstva])
			{
			var new_frame=document.createElement("iframe");
			new_frame.name="vrstva"+vrstva;
			new_frame.id="vrstva"+vrstva;
			new_frame.style.width=0;
			new_frame.style.height=0;
			new_frame.style.visibility="hidden";
			document.body.appendChild(new_frame);
			}
	
frames["vrstva"+vrstva].location.href="../mapa/loader.php?vrstva="+vrstva+"&jstyp="+jstyp+"&jspref="+jspref+"&lng="+lng;

instead of loading the correct page into the iframe, i get this in JS Console:

Security Error: Content at
http://www.webmapy.cz/app/uamk/mapa/engine2.php?use_maps=uamk_cesko&a0=../../../img_map/&is=1&ww=400&wh=300&x=3537134&y=5516482&zoom=0&x_sp=&y_sp=&mapa=uamk_cesko&sipka=sipka.gif&zobrazit=0&jspref=polozky_oblasti.php?typ=
may not load or link to
chrome://browser/mapa/loader.php?vrstva=t3&jstyp=js&jspref=polozky_oblasti.php?typ=.

Error: Access to
'chrome://browser/mapa/loader.php?vrstva=t2&jstyp=js&jspref=polozky_oblasti.php?typ='
from script denied
Source File: http://www.webmapy.cz/app/uamk/mapa/funkce.js
Line: 121

Error: uncaught exception: [Exception... "Access to restricted URI denied" 
code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"  location:
"http://www.webmapy.cz/app/uamk/mapa/funkce.js Line: 121"]

Reproducible: Always
Steps to Reproduce:
1. Wait till the specified URL loads
2. Try to check an unchecked checkbox ;-)

Actual Results:  
see Details

Expected Results:  
load icons into the map application
(load the specified URL into the iframe)
Assignee: general → firefox
Component: Browser-General → General
Product: Browser → Firefox
Version: Trunk → unspecified
This is a bug in TBE.  Please make sure to always test with TBE disabled before
reporting bugs.

*** This bug has been marked as a duplicate of 233733 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.