PDA

View Full Version : window.scrollTo Problem



JayBlake
07-13-2007, 10:16 AM
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.

mwinter
07-13-2007, 06:05 PM
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?

JayBlake
07-13-2007, 09:40 PM
Well, if I did I don't know how. And my other similar program still works. Both are running in MS Internet Explorer. Thanks.

jscheuer1
07-15-2007, 03:42 AM
Please post a link to the page on your site that contains the problematic script so we can check it out.