Re: [Serious] VBF RSS Feed.
There is an XPCOM API that seems to deal with a timer
http://www.xulplanet.com/references/.../c_timer1.html
Maybe check into that and see what you can make of it
Re: [Serious] VBF RSS Feed.
Quote:
Originally Posted by Cander
Thanks Cander for your post, I will look into it.
I just noticed that If I close the browser and reopen it, then the RSS Feed gets refreshed. What I need is a timer or Refresh the Links when user click on the main menu item.
I wonder It is at all possible to load the new Items without restarting the browser or by clicking Refresh Link button.
Re: [Serious] VBF RSS Feed.
I would think that Timer api should be exactly what you need. Basically you initialize with how many milliseconds between each refresh then a CallBack function that it will run when the timer 'fires'
My BEST guess from just looking at that page I sent you, something like this MIGHT work
Code:
var mycallback =
{
notify: function(thetimer)
{
//do your thing.
}
};
var myTimer = Components.classes['@mozilla.org/timer;1'].getService(Components.interfaces.nsITimer)
//fire every 1 second
myTimer.initWithCallback(mycallback, 1000, mytimer.TYPE_REPEATING_SLACK);
Again, just a guess as I cant test this since we are not allowe to install Firefox at work. :rolleyes:
Re: [Serious] VBF RSS Feed.
Quote:
Originally Posted by Cander
I would think that Timer api should be exactly what you need. Basically you initialize with how many milliseconds between each refresh then a CallBack function that it will run when the timer 'fires'
My BEST guess from just looking at that page I sent you, something like this MIGHT work
Code:
var mycallback =
{
notify: function(thetimer)
{
//do your thing.
}
};
var myTimer = Components.classes['@mozilla.org/file/directory_service;1'].getService(Components.interfaces.nsITimer)
//fire every 1 second
myTimer.initWithCallback(mycallback, 1000, mytimer.TYPE_REPEATING_SLACK);
Again, just a guess as I cant test this since we are not allowe to install Firefox at work. :rolleyes:
Sorry for my ignorance, but where would I place the code? Since I am not writing any custom menu or component, FireFox is creating the Menu From the XML file which I am generating.
Thanks for your help again.
Re: [Serious] VBF RSS Feed.
Dont really know since I am not 100% sure what exactly you are doing. I assumed you were writing an extension. What exactly is generating the RSS?
Re: [Serious] VBF RSS Feed.
Quote:
Originally Posted by Cander
Dont really know since I am not 100% sure what exactly you are doing. I assumed you were writing an extension. What exactly is generating the RSS?
I am using an asp file to generate the XML dynamically.
Re: [Serious] VBF RSS Feed.
Oh ok. Hmm, well i dont know. Maybe the RSS standard has a tag that specifies a refresh?
Re: [Serious] VBF RSS Feed.
Quote:
Originally Posted by Cander
Oh ok. Hmm, well i dont know. Maybe the RSS standard has a tag that specifies a refresh?
Yep thats the sort of thing i am looking at. I looked at an existing RSS Feed and they have an element called <lastBuildDate>, It could be that field that browser checks. I am generating that date dynamically everytime the my asp file is called.
Anyhow I will do some more research, thanks for your posts. If any one else has any other thoughts or suggestion please post.
Re: [Serious] VBF RSS Feed.
Is it possible for you to use a JS timer or something?
ØØ
Re: [Serious] VBF RSS Feed.
Quote:
Originally Posted by NoteMe
Is it possible for you to use a JS timer or something?
ØØ
Nope, its a pure XML file (RSS 2).
Just doing some searching, I dont think FireFox Allow Refreshing Link, It only refresh the links when you load the browser. Thunderbird on the other hand lets you specify a refresh time. Its probably same with other RSS reader. I havent use thunderbird but will check it out. It would have been great If you could have the link refreshed without having to close or clicking refresh menu.
Anyone else here use RSS with FireFox?
Re: [Serious] VBF RSS Feed.
Just posted my first attempt, have a look if you are interested. Link is in my sig.
:afrog: