orderassaulted
09-06-2011, 07:25 PM
How do I open a window from within a .js file?
I want to do this, below in a .js file like I would in a html file.
<a href="google.co.uk" class="thickbox"></a>
Philip M
09-06-2011, 08:03 PM
Why do you want to do it like that?
<script type = "text/javascript">
document.write('<a href="http://www.google.co.uk" class="thickbox">Click here</a>');
</script>
All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
Old Pedant
09-06-2011, 08:31 PM
Or maybe all you are looking for is this:
<script type="text/javascript">
location.href = "http://www.google.co.uk";
</script>