I am using Moodle 1.98. I'm a trying to open a pop-up window using javascript on the log-in page. In other words - in the instructions area on the right side of the log-in page, I want to have a link that when clicked will open the page is a smaller window.
I tried putting the following code into the instruction box on the administration/users/authentication/manage authentication page, but when I click on the link, the page opens but it opens in the same window. Is my code wrong? Is there a better way to open a sizable window?
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=680,height=550,scrollbars=no');
return false;
}
//-->
</SCRIPT>
<body>
<A HREF="../new_user/new_user.html"
XonClick="return popup(this, 'notes')">my popup</A>
</body>