Jump to content

Recommended Posts

Posted

The package fields are loaded via AJAX, so there is no way for it to set javascript into the header. You can, however, set inline javascript by setting HTML on the ModuleFields object you return from that method.

Posted

try blestaSetHeadTag with this code .

$fields->setHtml(" 
   <script type=\"text/javascript\">
    $(document).ready(function() {
     $(this).blestaSetHeadTag(\"script\", {type:\"text/javascript\", src: \"". $this->Html->safe( URL_TO _YOUR_JS_FILE) ."\"});
    });   
   </script>
  ");

i have used in a old project .

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...