Does this code get placed in between the <head> tags? Also how would you go about having a javascript popup only pop up when the frontpage is loaded. Right now on each menu selection a new pop up comes up. I've tried all these fixes and havent had success with either one:
1st ONE: <?php if (JRequest::getVar('view') != 'frontpage') : ?>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=450,height=450');");
}
// End -->
</script>
<?php endif; ?>
2nd ONE: <?php if ($option != "com_frontpage") : ?>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=450,height=450');");
}
// End -->
</script>
<?php endif; ?>
In both cases I have the following code placed within my body tag as well:
<body onLoad="javascript:popUp('
http://www.eventfactor.net/cms/templates/EventFactor/media/music_player.html')">