Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Iframe SSI script II - bounces to bottom of page

  1. #1
    Join Date
    Jun 2008
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Iframe SSI script II - bounces to bottom of page

    1) Iframe SSI script II

    2) http://www.dynamicdrive.com/dynamici...iframessi2.htm

    3) If you go to this website i am making, you can see the issue. i have searched the forums here but was unable to find a fix. if someone can point me to the correct thread or help with a fix, that would be great thank you...

    http://www.visitpromcountry.com/search.htm
    Don't enter any data, just hit search

    When the results come back, you can see the IFrame script nicely resizes the page. Scoll down to the entry:
    At Ripplebrook by the Prom
    And hit the 'click for more details' option

    Here is the problem
    The script resizes the page nicely again, but leaves you sitting at the bottom of the page and site users need to scroll up to get to the top of the listing. i want them once they click the 'click for more details' option - to end up at the top of the new file, not the bottom. can some one please help me?

    thank you...

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    In features.php change <body> to this:
    HTML Code:
    <body onLoad="scrollTo(0,0)">
    That should bring you to the top of the page on anything.
    Jeremy | jfein.net

  3. #3
    Join Date
    Jun 2008
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi Nile,

    thank you for helping me. i have dowloaded the file and added in the code as you suggested, but it is still doing the same thing? do you have any other ideas about why it might be doing it?

    thanks heaps,
    aya


  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Oops, sorry. That was my fault. Put it back(although it doesn't hurt at all), you can either put it back to <body> or just leave it. I see that you also have scrollTo on the search.htm, but it's in wrong. Make your <body> section this:
    Code:
    <BODY onLoad="scrollTo(0,0);MM_preloadImages('images/icon1a.gif','images/icon2a.gif','images/icon3a.gif','images/icon4a.gif','images/icon5a.gif','images/icon6a.gif','images/icon7a.gif','images/icon8a.gif','images/accomword1a.gif','images/accomword2a.gif','images/accomword3a.gif')">
    You had two different onLoads.
    Jeremy | jfein.net

  5. #5
    Join Date
    Jun 2008
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi Nile!

    thanks...

    I have removed it from features.php - and left it in on search.htm with the code you suggested.

    but the problem is still there when you click on the 'At Ripplebrook by the Prom' from the search results...

    if you have anything else i could try, that would be great thanks!
    aya


  6. #6
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Ahh, thats me being an idiot again! The page isn't reloading when you click on something in an iframe... Hmm, lemme think about this. Maybe ddadmin can swoop in and save me... lol
    Jeremy | jfein.net

  7. The Following User Says Thank You to Nile For This Useful Post:

    aya_13 (06-20-2008)

  8. #7
    Join Date
    Jun 2008
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    thanks heaps!

    really appreciate it hey


  9. #8
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Yeah, I'll still be thinking, but I was just so dumb, I should've thought. Sorry for my idioticle self, lol. :-/
    Jeremy | jfein.net

  10. #9
    Join Date
    Jun 2008
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    hey no worries!

    it is so cool you replied to me straight away like that. i am really stuck and it is the first time i have logged in here for assistance, and it is great that you guys help out like this anyway!

    have been battling this silly thing for a while! and am not a great coder, as you can now probably tell!!!
    i do more design side of things, but because this is my project i am stuck with the problem!

    if you can think of anything else, or if anyone else can assist, i am just so grateful for that!

    thanks,
    aya

  11. #10
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Ok, change this:
    Code:
    <BODY onLoad="scrollTo(0,0);MM_preloadImages('images/icon1a.gif','images/icon2a.gif','images/icon3a.gif','images/icon4a.gif','images/icon5a.gif','images/icon6a.gif','images/icon7a.gif','images/icon8a.gif','images/accomword1a.gif','images/accomword2a.gif','images/accomword3a.gif')">
    To this:
    Code:
    <BODY onLoad="makeScroll('MAIN');MM_preloadImages('images/icon1a.gif','images/icon2a.gif','images/icon3a.gif','images/icon4a.gif','images/icon5a.gif','images/icon6a.gif','images/icon7a.gif','images/icon8a.gif','images/accomword1a.gif','images/accomword2a.gif','images/accomword3a.gif')">
    Then, in your javascript, add this:
    Code:
    function makeScroll(idFra){
    if(document.getElementById(idFra).src != "databases/searchoursite.htm"){
    scrollTo(0,0);
    }
    setTimeout("makeScroll('"+idFra+"')",1000);
    }
    I hope that works.
    Jeremy | jfein.net

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
  •