Welcome to WebmasterWorld Guest from 54.196.243.192

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)

Junior Member

10+ Year Member

joined:May 8, 2002
posts: 179
votes: 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...
1:12 pm on Apr 20, 2010 (gmt 0)

Senior Member

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

joined:Dec 9, 2003
posts:3416
votes: 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.