I have a very simple html page which is rendered as a dialog. It is rendered the following way:

```
<a href = "simple.html" data-rel = "dialog" >

```

Simple.html page has following javascript code within < head > tags

```
<script>
   alert "hello";
</script>

```

Alert box is never popped when simple.html is rendered as a dialog. However, when simple.html is rendered, not as a dialog, javascript gets executed.

What is the way to execute/include javascript code in a html page that is going to be rendered as a dialog.

EDIT: Javascript gets executed as long as it is within `< div data-role="page" > ........ < /div >`