| Author |
Message |
Lutz
Joined: 18 Apr 2005 Posts: 19 Location: Sweden
|
| Posted: Thu Apr 21, 2005 - 2:50 pm Post subject: refresh onshow() ? |
|
|
| Just found a fatal flaw in my stargate widget, it has to refresh to change "days left", I've tried to put javascript code in the "onshow()" funtion but it won't work. |
|
| |
|
| |
islayer
Joined: 21 Apr 2005 Posts: 66
|
| Posted: Thu Apr 21, 2005 - 4:52 pm Post subject: |
|
|
its a fatal flaw in dashboard.apple have provided no way to refresh widgets.
with one of mine i just manipulate the contents of my main div with .innerHTML.its a hack but it works.
i havent been able to get window.location.reload() or any other javascript refresh command to work |
|
| |
|
| |
zzen
Joined: 21 Apr 2005 Posts: 43 Location: Czech Republic
|
| Posted: Thu Apr 21, 2005 - 4:53 pm Post subject: Assign the handler |
|
|
| Make sure you not only define your onshow() function, but also asign it as the handler of the onshow event. This is done via widget.onshow = onshow; Check the Apple widgets (WorldClock) for working examples. |
|
| |
|
| |
Lutz
Joined: 18 Apr 2005 Posts: 19 Location: Sweden
|
| Posted: Fri Apr 22, 2005 - 12:26 pm Post subject: |
|
|
| islayer wrote: | its a fatal flaw in dashboard.apple have provided no way to refresh widgets.
with one of mine i just manipulate the contents of my main div with .innerHTML.its a hack but it works.
i havent been able to get window.location.reload() or any other javascript refresh command to work |
I have tried that for some time now, I get the innerHTML to work in safair, but not dashboard, how did you make it work? |
|
| |
|
| |