Controlling pop up windows in book chapters

Controlling pop up windows in book chapters

by andy mison -
Number of replies: 0

Help!

I have been using a simple javascript to control the size of a popup window that links from a book chapter:

<script type="text/javascript">

function openpopup(popurl){
var winpops=window.open(popurl,"","width=176,height=116")
}
</script>

<a href="javascript:openpopup('http://ourcourses.ntschools.net/file.php/129/onsunday/Hitting_popup.html')" class="style1">How do you think this sound is made?</a>

It acts as a kind of one off quiz question/answer that looks neat and wraps around the answer text, and works really well, as long as you don't re-open the editor after it is saved, as it annoyingly gets cleaned: lots of painstaking work if you want more than one question.

Can anyone tell me how I might also control where the popup window appears in the main window of a chapter? In other html instances "left=400,top=400" alongside toolbars, location etc determine characteristics of windows, but I can only seem to get book chapters to respond to height and width instructions.

I'd also like to be able to open a picture file in the same way (without setting up an html doc), much as you can link to a file as a resource. This just seems to shrink the picture when I try it in a chapter. 

Any ideas?

Average of ratings: -