Try the Demo

Magento Forum

   
how to access javascript variable in php code? 
 
muk_t
Sr. Member
 
Total Posts:  205
Joined:  2012-07-24
 

Hi,

I want to access a javascript variable in php code.How can I do this please suggest me some way

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
crm4ecommerce
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2011-11-01
 

Hi muk_t,

You can only generate javascript code or generate script tag to link a javascript file, url to your php file. Javascript is available on browser, but php code is runned on web server, so you can’t access javascript code by php code.

Regards,

Philip Nguyen

 Signature 

CRM4Ecommerce is a leading of Ecommerce plugin with data synchronization bidirection service between Ecommerce web-stores (Magento, osCommerce, ZenCart, OpenCart, Prestashop, X-Cart...) with CRM Systems, and now Vtiger CRM & Zoho CRM were connected.

CRM4Ecommerce is now launching Facebook Fan Promotions Program: Discount 20% for all Facebook Fan Users.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rich Cleverley
Sr. Member
 
Avatar
Total Posts:  263
Joined:  2009-01-20
 

You would need to pass the variable through to PHP using an AJAX request.

 Signature 

Magepim.com

PhpIDS security extension available
Magepim_PhpIDS

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top