Hi
Am new to all this, so please be gentle with me. I have created a mail-to window containing a SWF which I want to link to from a piece of text. Looking through a few searches, I came up with the following solution, but guess what - it doesn't quite work and I don't know why.
In the HEAD section:
Code:
<script language="JavaScript" type="text/JavaScript">
function openpopup(){
window.open('http://www.mywebsite.co.uk/demo/contact.htm','contact','width= 497,height=435,resizable=no,scrollbars=no,directories=no,location=no,menubar=no,
top='+((screen.availHeight/2)-(435/2 ))+',left='+((screen.availWidth/2)-(497/2 ))+'')
}
</script>
Then to create the link, I've used
Code:
<a href="http://www.mywebsite.co.uk/contact.htm" onclick="openpopup()">HERE</a>
It opens the page correctly, but the page is full-size, not the size I want it to be (as defined in the function) 
Can anyone please tell me what I've done wrong?
Any help/advice gratefully received
Regards
Martin
Last edited by MartinS : 06-25-2005 at 07:42 PM.
Reason: Amendment to question
|