file: URL not loaded in XUL browser window




19 years ago
11 years ago


(Reporter: moz_user, Assigned: trudelle)



Firefox Tracking Flags

(Not tracked)




19 years ago
From Bugzilla Helper:
User-Agent: Mozilla/4.61 [en] (X11; U; Linux 2.2.12-20smp i686)

With M13, I was able to use a NON navigation:browser window to display HTML
files.  If the user clicked on a link (<a href>) within the window, the new page
would be displayed inside the content area of my XUL window. 

However, I've noticed with M14, the behavior has changed.  The initial window
looks the same, but when I click on a link, it will either display it in the
browser window (creating one if necessary). 

Reproducible: Always
Steps to Reproduce:
1. Create XUL window containing following element: <html:iframe id="foo"
type="content-primary" flex="1"/>
2. Click on a link (<a href>) in the displayed HTML document.

Actual Results:  The link was displayed in a navigation:browser window (creating
one if necessary).

Expected Results:  The new URL should have been loaded into the window
containing the <html:iframe> element.

The window was initially launched with the following JavaScript:

function launchOnlineHelp()
    // Display the corresponding help page
       "", "chrome,resizable,dialog=no",

<?xml version="1.0"?> 

<window id="helpWindow" 
        title="On-line Help"
        style="background-color: white;"
  <html:script language="javascript" src="chrome://help/content/help.js" />

  <browser id="help" type="content-primary" flex="1"/>


function onLoad()
    // Was an argument passed during the window load?
    if (window.arguments && window.arguments[0]) {
	    var element = document.getElementById('help');
	    if (element) {
    else {
      dump("** (js)onLoad, no argument passed!\n");

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<title>On-line Help</title>
<h1>On-line Help</h1>
<p>Click on a link below for more information:</p>
<p><a href="foo_help.htm">foo</a></p>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<title>Foo Help</title>
<h1>Foo Help</h1>
<p>If I knew more about "foo", I would explain it here</p>
</html> - I am trying to get this bug seen to. However, it is very 
possible that the many changes made to Mozilla between when you submitted it and 
now mean this test case no longer works (and the problem may be fixed anyway).

Could you possibly check that it does, zip up all the files, and attach them to 
this bug (using the "Create a new attachment" link)? If you don't have 
permission to do that, email me the file and I will.

Gerv - we really need your input on this bug, otherwise it will 
get closed, and that would be a shame, seeing as you seem to have done a lot of 
work on it...


Comment 3

19 years ago
Sorry I've been out of touch and unable to test the bug I reported.  An
untimely appendectomy on 5/19 took me out of commision for a month.  I'm
back to my PC so I'll check my bug against M16 and report back to you
as soon as I can.

--- becs

Comment 4

19 years ago
Here are some initial findings with M16. I'm able to display a XUL window
containing <browser> element where the src attribute is set to a URL (e.g.
"") or "about:blank" without any problems.  However, when
I attempt to specify a file (e.g. "file:///home/user/help_main.htm"), no content
area is displayed (verified by setting the window's background-color).  I don't
have a problem using the browser's "Open File..." menu item to access the
mentioned file, so I don't think the problem lies with the actual file.  I just
can't get a file to be displayed as the start page.  (For kicks and grins, I
even changed the browser.startup.homepage preference to point to the file and it
doesn't get displayed that way either.)

I should point out that I changed the onLoad() js function to first create a
browser instance (appCore) and then call
appCore.setWebShellWindow(this.window).  This approach allowed me to get my
example to work in M15.

Comment 5

19 years ago
                                                                        (Becki Sanford), so is this a different problem than "New URL 
not loaded in same html:iframe" now?

Comment 6

19 years ago
Since I was able to create a XUL window and change URLs within that window (i.e.
does not load new URLs into any open browser window), the original problem
appears to be fixed.  The file access issue should still be addressed. 

Comment 7

19 years ago
Triaging Rickg's buglist:

This developer is able to create a XUL browser window that starts up with 
an http: url, but unable to create a browser window that starts up a file: url.  
There is a good amount of detail above.

Reassigning to component owner.  Please reassign as necessary, thanks!
Assignee: rickg → trudelle
Component: HTML Element → XP Toolkit/Widgets: XUL
QA Contact: petersen → jrgm
Summary: New URL not loaded in same html:iframe → file: URL not loaded in XUL browser window

Comment 8

19 years ago
setting bug status to New
Ever confirmed: true

Comment 9

19 years ago
I was able to succesfully set the src attribute of a <browser> element with a
"file:///" string when using window.openDialog in my JavaScript.  I tracked it
down to a short between the keyboard and the user (a bad symbolic link).  I'm
still not able to set the pref("browser.startup.homepage") to a file though.

Sorry about the false alarm.  :(
ok, then closing.
Last Resolved: 19 years ago
Resolution: --- → INVALID


11 years ago
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.