Window-opening in called functions  

The effect

Popup Poetry

Gerard Manley Hopkins
William Blake
Emily Dickinson


[Poetry from Bartelby and RPO]
Here we delegate all the work of opening windows to functions in the page header. The link code becomes very simple.

Code in the page header

<script language="JavaScript" type="text/javascript"> 
<!-- 
function win1() {
msg=window.open("popup_001.html","","height=350,width=640,left=40,top=80,resizable=yes,scrollbars=yes");
}
function win2() {
msg=window.open("popup_002.html","","height=500,width=370,left=120,top=120,resizable=yes,scrollbars=yes");
}
function win3() {
msg=window.open("popup_003.html","","height=450,width=400,left=200,top=160,resizable=yes,scrollbars=yes");
}
// -->
</script>

Code in the links
<a href="javascript:win1()">Gerard Manley Hopkins</a><br>
<a href="javascript:win2()">William Blake</a><br>
<a href="javascript:win3()">Emily Dickinson</a><br>