I have this site: http://www.problemio.com and if you go there and click any link that says “important” it gives you a login popup. That popup works ok. The problem occurs when on that dialog that pops up, you press “create_profile” link.
Instead of showing the create profile popup, it goes to the create_profile page.
Here are my click handlers:
$('#login').live('click' , function()
{
event.preventDefault();
// Make the existing suggestions visible
$("#loginpopup").dialog();
$("#createprofilepopup").dialog( 'close' );
return false;
});
$('#signup').live('click' , function()
{
event.preventDefault();
$("#loginpopup").dialog( 'close' );
$("#createprofilepopup").dialog( { height: 800, width: 600 } );
return false;
});
I just put the event.preventDefault(); in there but not entirely sure how it is really supposed to work. Any advice or ideas why it isn’t working as I anticipated?
Thanks!
Change:
to:
Because you need the
eventargument, otherwise you are calling a function to an object that does not exists.