how to check if javascript is enabled in a module drupal7 I'm building a simple module that shows a jQuery UI dialog.
I have some HTML in my code but I only want to show this to users that have javascript enabled.

to give you an example here are the contents of my .module file:

function popover_init() {
    drupal_add_library('system', 'ui.dialog');
    drupal_add_js(drupal_get_path('module','popover') . '/popover.js', 'file');
}
?&gt;
&lt;div id="dialog" title="D7 jQuery dialog"&gt;
    &lt;p&gt; bla bla bla &lt;/p&gt;
&lt;/div&gt;


How do I check the drupal way that javascript is enabled so I can stop my module from loading unnecessary stuff ?
I don't think there is a way. Because your module runs on the server and it cannot interact with the client's browser in any way. 

Here's an answer on stackoverflow: Check if JavaScript is enabled with PHP