i have a section on a site that provides an events listing for a club night, for each night there is a flyer that is uploaded through a cms that i have built. The problem is that these flyers are all different sizes, some are landscape and some are portrait. the client wants these flyers to open in a popup. elsewhere in my site i use this script for a popup:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, \'" + id + "\', \'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0,width=500,height=600,left = 326,top = 132\');");
}
// End -->
</script>
and for the link:
<a href="javascript:popUp(\'biog.php?crew_id='.$dj_id.'\')">
this is contained in a functions page that i include in all other pages and which acts as a template. is there any way that i can dynamically size the popup for the flyer wihtout passing additonal arguments to the function that contains the popup script, i.e. a popup script that can be run inside a script as opposed to inside the head tags and therefore having to be passed to my functions page.
Thanks.