Dynamic content for an extension - Mozilla
This is a discussion on Dynamic content for an extension - Mozilla ; Hi,
I am developing an extension for firefox as a part of my course for my
college. As a part of the same, I am trying to have a list of stocks
that I am tracking, and I update the ...
-
Dynamic content for an extension
Hi,
I am developing an extension for firefox as a part of my course for my
college. As a part of the same, I am trying to have a list of stocks
that I am tracking, and I update the status bar with the tag and price
of the stock at a periodic interval. I am planning to store the list
of stocks on a file in the profile directory.
All well and good, I have it working so far. I managed to get file
save/restore work as well.
However, I have a problem now. I am trying to see how I can add a list
of stocks that the user wants to see, and I am in trouble as to how I
can do it. The following is my overlay code.
xmlns="http://www.mozilla.org/keymaster/gatekeeper/
there.is.only.xul">
id="stocktrac"
label="Start StockTrax"
tooltiptext="StockTrax, tracks stocks for the day"
ondblclick="Stocktrax.dialog()"
/>
Now, I need to find out what I need to do in the Stocktrax.dialog()
function. It presently opens a window.
dialog: function() {
var winProperties = "chrome=yes";
winProperties += ", centerscreen=yes";
winProperties += ", resizable=yes";
winProperties += ", scrollbars=yes";
window.open("chrome://stocktrax/content/stocklist.xul", "StockTrax
Preferences", winProperties);
},
Now, do I need to dynamically create a xul file for this purpose? That
surely seems like one way to do it.
Any other ideas? Please let me know....
Thanks.
-- Prassnitha.
-
Re: Dynamic content for an extension
Prassnitha wrote:
> Hi,
>
> I am developing an extension for firefox as a part of my course for my
> college. As a part of the same, I am trying to have a list of stocks
> that I am tracking, and I update the status bar with the tag and price
> of the stock at a periodic interval. I am planning to store the list
> of stocks on a file in the profile directory.
>
> All well and good, I have it working so far. I managed to get file
> save/restore work as well.
>
> However, I have a problem now. I am trying to see how I can add a list
> of stocks that the user wants to see, and I am in trouble as to how I
....
>
> Now, do I need to dynamically create a xul file for this purpose? That
> surely seems like one way to do it.
>
> Any other ideas? Please let me know....
No reason the xul file needs to be dynamic, unless you need to compute
its basic XUL. More likely you just want to have a UI for users to add
stocks, validate they aren't bogus characters and update the disk.