Closed Bug 12635 Opened 21 years ago Closed 20 years ago

onLoad does not work when xul file is loaded from command line


(Core :: XUL, defect, P1)

Windows NT





(Reporter: gayatrib, Assigned: danm.moz)



The onLoad handler only works when the location of the xul file is typed
in the location bar field of the browser. If you try to do
apprunner resource:/<pathName>/<fileName.xul> at the dos prompt, it
does not get invoked.

Marking it as a blocker bug, as this is required to run the ProfileManager
An example file:
Please note that the line "********In loadPage function"
gets printed onto the console only when the file is loaded
by typing it's path in the location bar and does not get
printed when invoked from command line.

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>

<window title="Example" style="width: 100%; height: 100%" align="vertical"
	onload="loadPage()" >

	function loadPage()
		dump("********In loadPage function\n\n");

<titledbutton id="" value="Next" align="left" style="margin-top:

Assignee: trudelle → hyatt
Priority: P3 → P1
Target Milestone: M11
reassigning to hyatt as p1 for m11
Blocks: 12674
Assignee: hyatt → danm
reassigning to danm
i don't understand why this is a blocker? when will people be typing URLs into
the command line?
Severity: blocker → normal
This is not a blocker. I think it was marked a blocker initially
because at that time the builds had a problem loading xul files
from the location bar. So all testing had to be done from command
line, and we could not proceed without that. Changing the priority
to normal.
mass-moving most m11 bugs to m12
Mass-moving non-PDT+ bugs to M13
spam: changing qa contact from ckritzer -> paulmac for xul bugs
Closed: 20 years ago
Resolution: --- → WORKSFORME
Seems to work with today's build. In case you find it not working for you, I'm curious:
you're saying it would successfully load the URL you requested, and then not execute
its onload handler? Strange. Can't think of a reason for that Luckily, neither can it,
BULK MOVE: Changing component from XUL to XP Toolkit/Widgets: XUL.  XUL 
component will be deleted.
Component: XUL → XP Toolkit/Widgets: XUL
Sorry for the spam. changing qa contact.
QA Contact: paulmac → jrgm
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.