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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -