-1

I use this but cannot find solution.

drupal_add_js(
  array('YOURMODULE' => array(
    'testvar' => $testvar
  )),
  array('type' => 'setting')
);
0

1 Answer 1

0

Check the object Drupal.settings using Firebug.

Or insert the code into your a js file.

Drupal.behaviors.YOURMODULE = function (context) {
  alert(Drupal.settings.YOUMODULE.testvar);
}

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.