Tuesday, September 11, 2012

Send javascript variables from drupal module to js


    drupal_add_js(array('mymodule' => array(
        'username' => 'Anthony',
        'uid' => 123,
        'likes' => array('ice cream', 'peanuts', 'coffee'),
    )), 'setting');

No comments:

Post a Comment