Gretch
2008.06.04, 08:46 PM
I have created a widget I want to run continuously. The prototype works fine but I cannot get it to run more than once.
I have tried enclosing the code in a while statement, but it just hangs.
function myWidgetCode()
{
i=1;
while (i=1);
{alert ("looping...") // my widget code goes here
}
}
This function is added to the end of the .js file and I execute it as part of the load function which is executed via the html onload="load();
function load()
{
setupParts();
myWidgetCode();
}
I also want this widget to loop continuously even when the dashboard is not present. It needs to run in the background. It will start and stop when added to the dashboard.
What do I need to do to make my widget run continuously? This is my first widget and first time coding with javascript.
Thanks in advance for your help.
I have tried enclosing the code in a while statement, but it just hangs.
function myWidgetCode()
{
i=1;
while (i=1);
{alert ("looping...") // my widget code goes here
}
}
This function is added to the end of the .js file and I execute it as part of the load function which is executed via the html onload="load();
function load()
{
setupParts();
myWidgetCode();
}
I also want this widget to loop continuously even when the dashboard is not present. It needs to run in the background. It will start and stop when added to the dashboard.
What do I need to do to make my widget run continuously? This is my first widget and first time coding with javascript.
Thanks in advance for your help.