Results 1 to 4 of 4

Thread: window.scrollTo Problem

  1. #1
    Join Date
    Jul 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default window.scrollTo Problem

    I can't for the life of me figure out why my scrolling isn't working. I had this same (equivalent, anyway) code in another program, then I completely redesigned the whole program and it works just fine except for this one bloody instruction. Here's the whole snippet:

    function Zoom() {
    if (zoomstat == "Zoom In ") {
    zoomstat = "Zoom Out";
    document.Oneslideform.ZoomButton.value = zoomstat;
    document.images.Oneshow.src = (photofolderhr + document.Oneslideform.Oneslide[Onecurrent].value);
    document.Oneslideform.Oneslide.selectedIndex = Onecurrent;

    window.scrollTo(310,2222);
    }
    else
    {
    zoomstat = "Zoom In ";
    document.Oneslideform.ZoomButton.value = zoomstat;
    document.images.Oneshow.src = (photofolder + document.Oneslideform.Oneslide[Onecurrent].value);
    document.Oneslideform.Oneslide.selectedIndex = Onecurrent;
    }
    }


    Why won't the scrolling work? I originally used window.scroll rather than window.scrollTo but now I want to use the non-deprecated version. But neither one works for me now. I've tried screwing around with it for several HOURS now (it's always the little things, isn't it?). Any help would be appreciated.

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by JayBlake View Post
    I can't for the life of me figure out why my scrolling isn't working.
    It is possible to disable author-defined scrolling in certain browsers. Are you certain that this isn't the reason in this instance?
    Mike

  3. #3
    Join Date
    Jul 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well, if I did I don't know how. And my other similar program still works. Both are running in MS Internet Explorer. Thanks.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Please post a link to the page on your site that contains the problematic script so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •