hi, i want to call a javascript function every 5 seconds, so i followed the Timer Control example. This JS function has to update the position of some items into a google map. I've tried to do it this way but i get an error:
......
<script type="text/javascript">
function MyJSFunction(){}
</script>
......
<asp:Timer runat="server" id="UpdateTimer" interval="5000" ontick="MyJSFunction()" />
<asp:UpdatePanel runat="server" id="TimedPanel" updatemode="Conditional">
.....
Any idea about how to do it? Thanks
PD: sry for my english
......
<script type="text/javascript">
function MyJSFunction(){}
</script>
......
<asp:Timer runat="server" id="UpdateTimer" interval="5000" ontick="MyJSFunction()" />
<asp:UpdatePanel runat="server" id="TimedPanel" updatemode="Conditional">
.....
Any idea about how to do it? Thanks
PD: sry for my english

Try this:
<script type="text/javascript">
function MyJSFunction(){}
window.onload = function() { setInterval(MyJSFunction, 5000); }
</script>
setInterval will continue to execute MyJSFunction every 5 seconds. If you need some way to stop it, try this:
<script type="text/javascript">
function MyJSFunction() { }
function stopInterval()
{
clearInterval(id);
}
window.onload = function()
{
id = setInterval(MyJSFunction, 5000);
}
</script>
<script type="text/javascript">
function MyJSFunction(){}
window.onload = function() { setInterval(MyJSFunction, 5000); }
</script>
setInterval will continue to execute MyJSFunction every 5 seconds. If you need some way to stop it, try this:
<script type="text/javascript">
function MyJSFunction() { }
function stopInterval()
{
clearInterval(id);
}
window.onload = function()
{
id = setInterval(MyJSFunction, 5000);
}
</script>