homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Opening an Ajax popup with anchor link scrolls parent window, too. :
Any clever script that avoids this

10+ Year Member

Msg#: 4103275 posted 7:32 pm on Mar 23, 2010 (gmt 0)

Trying the whole day to find a solution for the following problem:
I'm opening an Ajax popup (Submodal) on one of my pages. The popup is supposed to jump to certain places in the text, so I'm using anchor links, like <a href="mypage.html#anchor" class="submodal">
All working fine, except that if the anchor is at or near the bottom of the popup page the parent window jumps down, too. Is there any way to fix the parent window's position? That would solve me a huge amount of headaches...



WebmasterWorld Senior Member whoisgregg us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 4103275 posted 1:12 pm on Apr 20, 2010 (gmt 0)

For this sort of situation, you have to calculate the height of the page first and determine if you have enough room to place the submodal within that space. If you don't have enough room, then you shift the position of the submodal up/left/right/down to fit it within the existing page.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved