What an excellent question this one was. ;-) Thanks for the help Jason. Your code was a big help and worked great in IE but I could not get it to work in Firefox / Safari (and iPhone). Firefox and Safari would execute the pause first then the widgetExecute's back to back with no timeout. So I kept at it during the Colts/Chargers game last night and I wrangled up the following which is based off of Jasons code and works with IE, Firefox, Safari (and iPhone):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script language="javascript">
<!--
function ServoRoutine1(){
// assuming the servo is already at position A
widgetExecute('XXXXXXXXXX'); // position B
window.setTimeout(ServoRoutine2,3000);
}
function ServoRoutine2(){
widgetExecute('YYYYYYYYYY'); // position A
}
//-->
</script>
</head>
<body>
<a onClick="ServoRoutine1()">Servo Routine</a>
<div id="ioWidgets" style="display:none;">
<script type="text/javascript">document.write(unescape("%3Cscript src='" + "http://www.iobridge.com/widgets/io.js?XXXXXXXXXXX' type='text/javascript'%3E%3C/script%3E"));</script>
<script type="text/javascript">document.write(unescape("%3Cscript src='" + "http://www.iobridge.com/widgets/io.js?YYYYYYYYYYY' type='text/javascript'%3E%3C/script%3E"));</script>
</div>
</body>
</html>