I need to reload the data within a DIV, I am using a time stamp for testing purposes.

The code I have appears to work outside of Magento So I cannot see why it is not working on my Magento Site.

I am trying to achieve this using jQuery using the following:


The HTML is:

<div id="bopa">
<?php $datee = new DateTime(); echo $datee->format('H:i:s') . "\n";?>

Does anyone know why this isn't working?

  • are you getting any js errors in console? use F12 to check
    – Robin
    Aug 16, 2016 at 13:43
  • No errors in console Aug 16, 2016 at 14:15

1 Answer 1


your snippet will not working with native php. according to jQuery official Document you need to put first argument as same page as Object type(string url).

  • I have changed the code as I believe that $ conflicts with Magento Prototype. Aug 16, 2016 at 13:17
  • did your console show you a ajax request ?
    – user27155
    Aug 16, 2016 at 13:22
  • nothing is in console. Aug 16, 2016 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.