Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Parent Page Jumps When Iframe is Reloaded

  1. #11
    Join Date
    Jan 2006
    Posts
    170
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Hey Arie.

    Got it solved. With your suggestion, I did a little research and came up with the following:

    Code:
    <a href="BookList.html#A" target="BookList" onclick="checkbrowser();">A</a> | 
    <a href="BookList.html#B" target="BookList" onclick="checkbrowser();">B</a> | 
    <a href="BookList.html#C" target="BookList" onclick="checkbrowser();">C</a> | 
    :
    :
    :
    Where checkbrowser is:
    Code:
    function checkbrowser(){
    browsername=navigator.userAgent;
    xx=document.documentElement.scrollTop
    if (browsername.indexOf("Safari")!=-1) xx=document.body.scrollTop;
    setTimeout('window.scrollTo(0,xx)',0);
    }
    The only thing is that in IE and Safari, the window flashes when one of the hash links is clicked. A bit annoying, but much, much better.

    If you figure out a way of getting around the screen flashing, let me know. Otherwise, I think I'm good to go.

    Thanks for the help.
    Jim

  2. #12
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    Nice you solved it.
    On my machine, the flash is not very annoying. You could try to use jquery fadeIn / fadeOut for softening the flash.

Similar Threads

  1. Replies: 7
    Last Post: 06-28-2012, 07:56 PM
  2. Replies: 0
    Last Post: 09-07-2009, 09:17 AM
  3. how to get name of iframe parent page
    By pdsok in forum JavaScript
    Replies: 6
    Last Post: 11-26-2007, 07:48 PM
  4. Script to force a page into its parent iframe
    By jlorenz in forum JavaScript
    Replies: 16
    Last Post: 02-28-2007, 03:58 PM
  5. Replies: 0
    Last Post: 06-03-2005, 07:00 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •