Results 1 to 9 of 9

Thread: Stop scroll upon page load

  1. #1
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default Stop scroll upon page load

    Hi,
    Here is the page in question http://www.theremotedoctor.co.uk/jaz...ary-navigation
    When you first visit this page it scrolls to a specific point.

    When you visit this page however it doesnt scroll, which is correct http://www.theremotedoctor.co.uk/hon...y_remotes.html

    I am trying to locate in the code where the culprit is that is making the fir link above scroll upon page load.
    Any help would be great as ive now looked for 20 minutes and dont see it,even though i must of put it there at some point.

  2. #2
    Join Date
    Jan 2009
    Location
    NH
    Posts
    675
    Thanks
    98
    Thanked 26 Times in 26 Posts

    Default

    I'm not sure if you noticed but you have a closing script tag, but no open script above it.

    </script>
    <!-- made by www.metatags.org -->

  3. #3
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    You are asking the page to scroll by adding a parameter in the URI:

    Code:
    http://www.theremotedoctor.co.uk/jazz.html?scrollto=secondary-navigation
    If you remove the parameter from the URI, the page doesn't scroll:

    Code:
    http://www.theremotedoctor.co.uk/jazz.html

  4. #4
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    Hi,
    I have checked the page in question again but i dont see anything like the following within the code ?

    Code:
    http://www.theremotedoctor.co.uk/jazz.html?scrollto=secondary-navigation

  5. #5
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    It's not in the page, it's the link you use to call the page that matters! Your second example page behaves in exactly the same way as the first:

    Without scrolling:

    http://www.theremotedoctor.co.uk/hon...y_remotes.html

    With scrolling:

    http://www.theremotedoctor.co.uk/hon...ary-navigation

  6. #6
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    Ive done a search through all the files for this site using the text below but results come back "Zero" ?
    Code:
    theremotedoctor.co.uk/jazz.html?scrollto=secondary-navigation

  7. #7
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    The full link may not be there, try searching for just "scrollto". That's the part of the link which is causing the problem.

  8. #8
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    If it helps, this is a random selection of lines from your home page:

    Code:
         <li><a href="#">KEYS & REMOTES</a>
    	 <ul>
         <li class="current">     <li><a href="karaudi.html?scrollto=selection">AUDI</a>
         <li><a href="karbmw.html?scrollto=selection">BMW</a></li>
    	 <li><a href="karfiat.html?scrollto=selection">FIAT</a></li>
         <li><a href="karford.html?scrollto=selection">FORD</a></li> 
         <li><a href="#">HONDA</a>
         <ul class="sub-menu">
         <li><a href="karaccord.html?scrollto=selection">ACCORD</a></li>
         <li><a href="karcivic.html?scrollto=selection">CIVIC</a></li>
         <li><a href="karcrv.html?scrollto=selection">CR-V</a></li>
         <li><a href="karfrv.html?scrollto=selection">FR-V</a></li>
         <li><a href="karhrv.html?scrollto=selection">HR-V</a></li>
         <li><a href="karjazz.html?scrollto=selection">JAZZ</a></li>
         <li><a href="karstream.html?scrollto=selection">STREAM</a></li>
         <li><a href="kars2000.html?scrollto=selection">S2000</a></li>
         <li><a href="karotherkeys.html?scrollto=selection">OTHER KEYS</a></li>
         </ul>
         </li>
         <li><a href="karjaguar.html?scrollto=selection">JAGUAR</a></li>
         <li><a href="karlandrover.html?scrollto=selection">LAND ROVER</a></li>
         <li><a href="karlexus.html?scrollto=selection">LEXUS</a></li>
         <li><a href="karmazda.html?scrollto=selection">MAZDA</a></li> 
         <li><a href="karmercedes.html?scrollto=selection">MERCEDES</a></li>
         <li><a href="karnissan.html?scrollto=selection">NISSAN</a></li> 
         <li><a href="karrangerover.html?scrollto=selection">RANGE ROVER</a></li>
         <li><a href="karsmartcar.html?scrollto=selection">SMART CAR</a></li>
         <li><a href="karsuzuki.html?scrollto=selection">SUZUKI</a></li>
         <li><a href="kartoyota.html?scrollto=selection">TOYOTA</a></li>
         <li><a href="karvolkswagen.html?scrollto=selection">VOLKSWAGEN</a></li>
         </ul>
         </li>

  9. #9
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    Hi,
    Thanks for all the input but ive found it.
    I have spent ages looking through my site BUT it wasnt there.

    I have on my taskbar an icon called Morning Coffee.
    When i click on this each day in its database is a selected list of my urls for my site.
    One of them being theremotedoctor.co.uk/jazz.html?scrollto=secondary-navigation
    So ive now changed it to theremotedoctor.co.uk/jazz.html and now sorted.

Similar Threads

  1. Multi-zoom help: load magnified area on page load
    By tbarmann in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 06-23-2013, 03:23 AM
  2. Looking for a script... images don't load until you scroll to them
    By evanmiller2007 in forum Looking for such a script or service
    Replies: 20
    Last Post: 11-23-2011, 08:19 AM
  3. Manual Scroll - Stop after a few pixels
    By brandy_000 in forum JavaScript
    Replies: 3
    Last Post: 05-10-2011, 08:41 AM
  4. Step Carousel - dynamically load panels and stop autostep
    By neil123 in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 01-26-2011, 02:20 PM
  5. CMotion Image Gallery scroll on page load
    By procyan in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 11-05-2008, 09:03 PM

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
  •