groennerud

Hi,

I have an image which displays the actual weather information of my weather station.
This image will be automatically created on my server every 30 minutes and I want to refresh this image every 30 minutes in my sidebar gadget.

I created this code:

Code Snippet


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Koelschwetter</title>
<style type="text/css">
body {
margin: 0;
width: 140px;
height:140px;

}
.layer {
position: absolute;
margin-top: 45px;
margin-left: 0px;
height: 95px;
width: 140px;
cursor: hand;
cursor: pointer;
background-image: url(blank.gif);
}
</style>



</head>

<script language="VBScript">

Sub Window_Onload
PutData
iTimerID = window.SetInterval("PutData", 6000)
End Sub

Sub PutData
kwcode = "<g:background src='http://www.wetterletter.com/gadget.png' style='position:absolute;width:140px;height:140px;z-index:-1'/><div class='layer' onmousedown='window.open(\'http://www.wetterletter.com\')';></div>"
DataArea.InnerHTML = kwcode
End Sub

</script>

<body>
<span id="DataArea"></span>

</body>
</html>


This code displays my weather image as transparent picture but it will never be refreshed.
If I close the gadget by (X) and reload it, the same old image will be shown.

If I restart the complete vista workstation, the actual picture will we loaded.

I guess that there might be a cache, but I don't know how to solve this.

Does anyone have an idea, how to solve my problem.

Thanks

Erik




Re: Sidebar Gadget Development Need Help for refreshing of a backimage on a vista sidebar gadget

Edward Priest

I believe that you want to post this question in the Windows Sidebar forum. This is the Windows SideShow forum.

Edward Priest

Windows SideShow Test Lead






Re: Sidebar Gadget Development Need Help for refreshing of a backimage on a vista sidebar gadget

groennerud

Hi Edward,

yes you are right, I posted this into the wrong section.

But I solve my problem by myself. The code works fine, problem is the cache of the Internet explorer.
I solve my problem to add a random number to the picture: image.png 2739 Each time the pictcture will be loaded I generate another number.... ;-)

Erik