I’m using Fancybox to display a popup window, set as type: 'ajax' so I can automatically resize it. The problem though is that instead of popping up the Fancybox window, it redirects to the page in the browser instead.
Code is pretty simple Fancybox:
$('#hiddenLink').fancybox({
autoDimensions: true,
showCloseButton: false,
type: 'ajax',
href: 'login.aspx'
}).trigger('click');
With hiddenLink being as its name implies a blank a tag used so I can launch the popup when the page loads.
Any idea why it’s redirecting instead of launching the popup, and more importantly how to get the desired functionality? I want the contents of the page to be loaded in the Fancybox not have the entire page redirect. If I set this to iframe it works as expected but clicking a link inside the iframe will scroll the parent page and this isn’t what I want. Also, I want the fancybox display to dynamically resize based on the size of the content it contains, and this functionality is only available when using the Ajax type.
Turns out the redirection was due to also having an ASP.NET Timer control on the same page.