I'm trying to build an extension and having a hell of a time.
I've gone through the "hello world" example, I can do that much. Simple label="text" isn't the problem. What I want to do is have a seperate JavaScript issue a document.write("text") to the label="text" field.
The relevant part of my XUL looks like this:
Where getInfo("path") is a script I have stored in a seperate .js file. The JavaScript works as far as I can tell - I can fire it up in IE6 and it gives me the info I need.
However, in the status bar (using the above code), it doesn't run the script. All I get is the contents between the apostrophes - in this case getInfo("path") is displayed in the status bar. Completely useless... I want it to run the damn function, not regurgitate my code.
I try taking the apostrophes out, and it goes apeshit. The status bar bloats to ~10% vertical height and contains part of the code in bolded red.
I've tried testing varying syntaxes using document.write("test") instead of getInfo("path"). It never runs the JavaScript. Is this by design, JS being disabled in the status bar? Or is it a flaw in my code?
For the record, my getInfo("path") function extracts certain variables from an XML page, then issues two document.write() commands to display the text. I plan to have these outputs displayed horizontally inline in the status bar.
I've gone through the "hello world" example, I can do that much. Simple label="text" isn't the problem. What I want to do is have a seperate JavaScript issue a document.write("text") to the label="text" field.
The relevant part of my XUL looks like this:
Code:
<statusbar id="status-bar">
<statusbarpanel id='my-panel' label='getInfo("path");'/>
</statusbar>
However, in the status bar (using the above code), it doesn't run the script. All I get is the contents between the apostrophes - in this case getInfo("path") is displayed in the status bar. Completely useless... I want it to run the damn function, not regurgitate my code.
I try taking the apostrophes out, and it goes apeshit. The status bar bloats to ~10% vertical height and contains part of the code in bolded red.
I've tried testing varying syntaxes using document.write("test") instead of getInfo("path"). It never runs the JavaScript. Is this by design, JS being disabled in the status bar? Or is it a flaw in my code?
For the record, my getInfo("path") function extracts certain variables from an XML page, then issues two document.write() commands to display the text. I plan to have these outputs displayed horizontally inline in the status bar.
Last edited: