javascriptpopupphpfox

PHPFox - GetBlock - Javascript Does not execute after getContent


I am using phpfox v3.7 script. i have an issue of executing javascript, when i load a block using getBlock method.

I am calling this getblock method from the service file which in turn gets called by an ajax function. i am following the below mentioned sequence for the actions.

  1. The controller loads the initial module A,
  2. On Module A, calling another Module B,
  3. On click of a button in module B, using ajax call, i am executing a service and within that calling getBlock method.

The Block which gets the content has javascripts , which does not get executed once the block is loaded on the targeted page.


Solution

    1. well try to use your javascript code in the literal tag like

            {literal} //your javascript code here{/literal} 
      if you are failed to load the main javascript library in the block template file, use direct path to your javascript file in the template,i mean include that js
      library in the block template itself

      Hope this solution will definately work