Byron_SpexFox

EDIT: I have the gadget refreshing now, but how do I make it refresh only certain elements I'd be great to have just the SSID refresh when needed, or the Signal Strength.



Re: Sidebar Gadget Development Refreshing Gadget Content problem

Jonathan Abbott

How are you currently refreshing it

Setup a refresh function, running on a timer, that only updates the elements you want to update. eg

window.setInterval(myRefreshFunction, 5000); //5 secs
...
function myRefreshFunction() {
// update the elements
}




Re: Sidebar Gadget Development Refreshing Gadget Content problem

Byron_SpexFox

That is the way the gadget currently refreshes, but how do I make it refresh only certain elements Example:

<span id="tester">[javascript innertext that changes]</span>

What would you put in the myRefreshFunction() for code =P That's what I don't know.





Re: Sidebar Gadget Development Refreshing Gadget Content problem

Jonathan Abbott

window.setInterval(myRefreshFunction, 5000); //5 secs
...
function myRefreshFunction() {
tester.innerText = "...";
}