I' trying to create a lightbox where when you click on Login, a lightbox will popup. Here is my code.
<?php
if(!isset($_SESSION['username']))
{
echo '<a onclick="javascript:displaylightbox({width:500,height:660,centerOnScroll:true,overlayOpacity:0.6})" href="./database/login.php" target="_self">Login</a>';
}?>
The link works, but the lightbox doesn't popup. Link load like normal instead.
Here is the function
<script>function displaylightbox(url, options)
{
options.padding = 0;
options.autoScale = true;
options.href = url;
options.type = 'iframe';
$.fancybox(options);
}
</script>
Please help. Thank you!