I'm using the following javascript function that when a button the top frame is clicked it moves the middle frame horizontally.
<!-- page scroller
var x = 0; dx = 0; dx2 = 1;
function scrollit(dest) {
dx = Math.abs(dest - x) / 30;
if (dx>50) { dx = 50; }
dx2 = 1;
if (dest < x) { dx2 = -1;}
while(dest != x) {
// check arithmetic retardation
if ((dx+1)*(dx+2)/2 <= Math.abs(x-dest)) {
dx = dx + 1;
} else {
if (dx*(dx+1)/2 > Math.abs(x-dest)) {
dx = dx - 1;
}
}
x = x + dx*dx2;
if (dx>50) { dx = 50; }
parent.main.scrollTo(x, 0);
}
}
//-->
On the button;
a href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:scrollit(750);"
My problem is that after you scroll to your selected section you can click to enter it.
The top menu remains the same with you slected button highlighted.
I want to able to click one of the top menu buttons and then the the main'scroller' page re-loads into the center frame and then it moves to the selected section.
Any ideas on how to do this?
Thanks for your help.
<!-- page scroller
var x = 0; dx = 0; dx2 = 1;
function scrollit(dest) {
dx = Math.abs(dest - x) / 30;
if (dx>50) { dx = 50; }
dx2 = 1;
if (dest < x) { dx2 = -1;}
while(dest != x) {
// check arithmetic retardation
if ((dx+1)*(dx+2)/2 <= Math.abs(x-dest)) {
dx = dx + 1;
} else {
if (dx*(dx+1)/2 > Math.abs(x-dest)) {
dx = dx - 1;
}
}
x = x + dx*dx2;
if (dx>50) { dx = 50; }
parent.main.scrollTo(x, 0);
}
}
//-->
On the button;
a href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:scrollit(750);"
My problem is that after you scroll to your selected section you can click to enter it.
The top menu remains the same with you slected button highlighted.
I want to able to click one of the top menu buttons and then the the main'scroller' page re-loads into the center frame and then it moves to the selected section.
Any ideas on how to do this?
Thanks for your help.