Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Opening an Ajax popup with anchor link scrolls parent window, too. :

Any clever script that avoids this



7:32 pm on Mar 23, 2010 (gmt 0)

10+ Year Member

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...


1:12 pm on Apr 20, 2010 (gmt 0)

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

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.

Featured Threads

Hot Threads This Week

Hot Threads This Month