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

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -