If this is in wrong section, forgive me.
I'm wanting to add a pop-up window to the homepage, & have resorted to trying to add a custom html module called 'myJavacript' & assigning it to the homepage there...problem is, the code is stripped out & some tries results in being written out on the page versus sticking to a backend code to be read.
In the html editor, in the code portion...I put either
Quote<?php
$document = JFactory::getDocument();
$document->addScriptDeclaration('
window.open ('popup.html', 'newwindow', config='height=550, width=600, toolbar=no, menubar=no, scrollbars=no, resizable=no,
location=no, directories=no, status=no');
);
');
?>
or plain old
Quote<SCRIPT LANGUAGE="javascript">
window.open ('popup.html', 'newwindow', config='height=550,
width=600, toolbar=no, menubar=no, scrollbars=no, resizable=no,
location=no, directories=no, status=no')
</SCRIPT>
First way writes the middle code out & last way does nothing....what am I doing wrong & is there another method to go about this?
Thank you.
I added an extension to not strip the code....so now the text editor in a module I made has...
Quote{source}
<?php
$document = JFactory::getDocument();
$document->addScript('http://website.com/MY-JS.js');
?>
{/source}
Then in the MY-JS.js I have a function to open a new window...& it still isn't working?