PDA

View Full Version : Pop up window?


likegluelikecrew
11-01-2005, 07:24 PM
I have a swf. file that's about 750 by 550 pixels, and I want to set it up so when the user clicks on the link for it, it opens in a pop up window perfectly sized for the movie. How do I do that with Dreamweaver? Thanks a bunch, keep it real...

We Are 138

davidj
11-02-2005, 09:52 AM
place this into the <head> of your page


<head>

<script language="JavaScript">
<!--
//tmtC_winOpen
var popup;
//tmtC_winOpenEnd

function tmt_winOpen(u,id,f,df){
if(eval(id)==null||eval(id+".closed")){
eval(id+"=window.open('"+u+"','"+id+"','"+f+"')"); eval(id+".focus()");}
else if(df){eval(id+".focus()");}
else{eval(id+"=window.open('"+u+"','"+id+"','"+f+" ')");eval(id+".focus()");}
}
//-->
</script>

</head>


place this where you want the link to appear in the body of the page


<a href="#" onclick="tmt_winOpen('flashpage.htm','popup','widt h=750,height=550,
left=50,top=50,
toolbar=yes,menubar=yes,location=yes,
scrollbars=yes,status=yes,resizable=yes,
directories=yes,copyhistory=yes',1)">click this link</a>


change flashpage.htm to the page you want to call

play around with the options in the link (menubar=yes,location=yes,scrollbars=yes,status=ye s,resizable=yes,directories=yes,copyhistory=yes') By switching these to No then you turn off that option

also play around with the sizes ('width=750,height=550,left=50,top=50) untill you get it right. The LEFT & TOP values control where you want it to load on the screen (the position) left=0,top=0 will launch the popup top left

test @ 800 x 600 first. Make sure you dont get any scrolling at that res when you launch the popup