I have a shopping cart block within the main pages that I want to refresh by calling the div called &quot;panel-pane pane-block pane-uc-cart-0&quot; every 2.5 seconds.<br><div style="display: inline;">
</div><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup {  position:absolute;  z-index:9999;  padding: 0px 0px;  margin-left: 0px;  margin-top: 0px;  width: 240px;  overflow: hidden;  word-wrap: break-word;  color: black;  font-size: 10px;  text-align: left;  line-height: 13px;}</style>What is the most efficient way to implement this?<br>

<br>I believe the way to call the javascript within drupal is by using the drupal_add_js() command but where do I put these commands so that the timer is run to refresh this shopping cart block every 2.5 seconds?  I have seen some documentation that recommends using hook_init for javascript that is needed for all pages.<br>
<br>I believe that the timer is setup by running the command:<br>        <i>setInterval(shoppingCartInfo, 2500);</i><br>With shoppingCartInfo being a command that does a call to refresh the shopping cart block which could be a set of ajax calls or maybe command like <i>window.panel-pane pane-block pane-uc-cart-0.refresh().<br>
</i><br>Thanks,<br><br>John<br><br>   <br>