javascript - Drupal 6 Drupal_add_js -
i realized need add javascript drupal block module front page. found out reason when add:
drupal_add_js(drupal_get_path('module', 'slider') .'/slider.js');
to case "view" in slider_block function, webpages except front page module used on, @ .js , run instead of loading normal page.
the slider.js is:
drupal.behaviors.slider = function(context) { var x x = 50; document.write (x); //prints value of x }
Comments
Post a Comment