[support] I have a shopping cart block within the main pages that I want to refresh by calling the div called "panel-pane pane-block pane-uc-cart-0" every 2.5 seconds.

John Mitchell mitchelljj98 at gmail.com
Thu Jan 27 14:21:16 UTC 2011


I have a shopping cart block within the main pages that I want to refresh by
calling the div called "panel-pane pane-block pane-uc-cart-0" every 2.5
seconds.
What is the most efficient way to implement this?

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.

I believe that the timer is setup by running the command:
        *setInterval(shoppingCartInfo, 2500);*
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
*window.panel-pane pane-block pane-uc-cart-0.refresh().
*
Thanks,

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110127/28a7f474/attachment.html 


More information about the support mailing list