Home › Forums › JavaScript › Need Help in Figuring Out Modal with iFrame
- This topic is empty.
-
AuthorPosts
-
January 12, 2013 at 6:22 pm #41957
EJMD
ParticipantHi.
I’m attempting to create a modal dialogue for a site I maintain. The goal is, when the user clicks a link to read an article or posted review, a modal dialogue appears to display the text and related images, with links at the bottom to access other related pages (i.e., bibliography, etc.).
Now, I’m quite new at trying to figure out this modal window business, so be kind. ;) But I’m primarily concerned whether I’m executing this properly.
Additionally, I’ve disabled scrolling when the modal appears to prevent the user from going further down the main page, but when the modal is ‘closed,’ the page is at the top. My concern is if the list of links grows longer and one at the bottom is clicked, the user’s place is lost – and I don’t want that.
The HTML:
EJMD
ParticipantI forgot to include two things:
This is the close HTML:
And this is the URL to the live test page:
January 17, 2013 at 10:32 pm #121318EJMD
Participant(I accidentally posted a non-comment and I can’t figure out how to delete a comment :-P)
January 17, 2013 at 10:33 pm #121321EJMD
ParticipantAfter playing around with the code (and working through some frustration), I managed to figure this one out on my own by changing the position attribute for the _#overlay div_ rule from _absolute_ to _fixed_, and then by removing the _href=”#”_ statement from the opening ‘a,’ making it
And that’s all, folks.
AuthorPostsViewing 4 posts - 1 through 4 (of 4 total)- The forum ‘JavaScript’ is closed to new topics and replies.