Fancybox Pop-up Login - Page only opens in modal box - html

I'm trying to create a log-in page using Fancybox. Everyhing works fine, except when I redirect the user to the logged-in page, it keeps opening up in the modal dialog box.
How can I reference the parent?
parent.opener.location.href is not working.
Thanks

It seems the following worked:
parent.document.location.href

Related

Which div to programmatically click to close bootstrap modal

I am writing tests for my Bootstrap 3.x webapp using Nightwatch. All is working fine, but I would like to add the "close modal by clicking somewhere next to it" in one of my tests. I don't seem to be able to identify the html element that's supposed to receive the click event however.
Can anyone help me with this?
Thanks!
The background is a div with class .modal-backdrop. According to the docs: "...generates a .modal-backdrop to provide a click area for dismissing shown modals when clicking outside the modal."

How to access the modal popup placed in content page from Master page control?

I am creating a website using ASP.NET and it consists a master page, I have a login link on this master page so that it is available for all the content pages. Now I want the login page to be opened as a modal popup, so I wrote the code for modal popup in login page's aspx file. But I don't know how to access that modal popup placed on login content page from that login link that is present on master page so that the modal can be open at any page whenever i click on the login link??
Can anyone help me?
I have attached the screen shots of master page and login page and highlighted the concerned parts.
Thank you
First image is of login content page
Second image is of Master page
could you not add an on click event to the login link or capture the event with jquery?
It looks like your using bootstrap, so what about adding this bit of JS.
$('#LoginModal').modal('show');
You can then give each input a name or ID on the login modal, the capture it by serialising the login form on button click.

Bootstrap Modal only load div when clicked

Im using Bootstrap on a website where a page has a few modals.
Using Chrome Dev Tools i was testing the network usage and noticed that the images in the modal view are called/pre-loaded when the page loads - I guess that makes sense they are all in divs on a single page.
So my question is it possible to avoid that div from running only until the actual link to a particular modal is clicked?
Thanks.
Use $.get or $.load in the click event handler of the button to display the modal.
Note that the HTML data you load via this ajax technique must be in the right bootstrap modal template.
See this gist here

Making page not (reload) when the function is toggled? READ

I'm trying to fix this issue I'm having. I am trying to get it so when a user clicks the login button, it will make the <div> drop down. The <div> does drop down, but the page teleports to the top of the page when you click the button. And that's an issue for me.
So can anyone fix this code to make it so the page doesn't teleport up every time they press the LOGIN button?
Thanks for all help in advance~
Here is the link to the code - http://jsbin.com/oyujoy/4/edit
Change your link from:
LOGIN
To:
LOGIN
See: http://jsbin.com/apudem/1/

facebook javascript sdk UI dialog resetting scroll position

i have a long page, where near the bottom I have a "post on facebook" button. when the user clicks this the FB.UI dialog from the facebook javascript sdk pops-up. This is all working fine except that the page scrolls back to the top of the page where the dialog is showing.
i have the set just under the tag as facebook recommends. I've tried moving this to the part of the page where i need it but the page keeps scrolling back to the top
Any idea how i can get the facbook dialog to show where the current page scroll position is?
You'll want to use the position:fixed; attribute within the element that contains the Facebook dialogue. Check out this link for further information and examples.