Add inline Javascript in drupal 6

Here I call ajax funtion in drupal. You can freely called your js in any drupal function.

whenver your function will run this js will auto add.

$js = " jQuery(document).ready( function( ) {
           $.ajax({
                       url: '{$base_url}<your URL>',
                       success: function(data) {
                                                                $('<div id>').html(data);
                                                            }
                     });

            });";
drupal_add_js($js, 'inline');

Tags: 
X