PDA

View Full Version : Javascript query


Darth_Tanion
Jul 6, 2004, 06:19 PM
I have a website I have created and some of the links open in new windows. This is simple enough to do. I have used the code:
<a href="wherever.html" target="new.window"> but the problem is that I have no control over the size of the window. I would like them to come up in a small window that cannot be resized or maximised.

tadds
Jul 21, 2004, 10:55 AM
Create a JavaScript function

<script language="JavaScript1.2">
<!-- Script Begin
function NewWindow() {
window.open("sample.html","title","toolbar=0,location=0,directories=0,menuBar=0,scrol lbars=0,resizable=0,
width=320,height=120,left=100,top=100");
}
// Script End -->
</script>



Then just call the NewWindow() routine when you want a formatted window. Play with the options until you get it correct.

Darth_Tanion
Jul 21, 2004, 03:51 PM
Awesome. Thanks.