Run JavaScript inside a PHP page in an Observer - Magento -
i have module contains observer
, observer
php page need run scripts, javascript, made using echo
failing in parts of magento. know other alternate way beyond echo
.
thank you.
you can try include code in separate .js file , include file using xml below sample layout code snippet
<layout> <adminhtml_modifiedproduct_index> <reference name="head"> <action method="addjs"><file>modifiedproduct/datefilter.js</file></action> </reference> </adminhtml_modifiedproduct_index>
Comments
Post a Comment