include Javascript inline in drupal form api
Say, You want to include a Java Script code, inline in drupal form api.
drupal_add_js () shall be used.
Ex. :
While using this method, No need to add <script> tags.
This method will automatically include those tags. Just We need to mention the Java script methods / variables .
drupal_add_js (' alert ( \' Hello World ! \') ' , 'inline' );
Say, You want to include a Java Script code, inline in drupal form api.
drupal_add_js () shall be used.
Ex. :
While using this method, No need to add <script> tags.
This method will automatically include those tags. Just We need to mention the Java script methods / variables .
drupal_add_js (' alert ( \' Hello World ! \') ' , 'inline' );
No comments:
Post a Comment