ssurmi
05-16-2003, 02:39 PM
Hello,
I am trying to load a new page after pressing the submit button and want it to be scrolled to a specific position when loaded.
I know it is very easy to use on the same page by using the window.scrollTo(x,y) function. It is also simple if I try to load a page at the beginning by calling the onload in the body tag:
<body onload = "scrollWindow()">
Just don't know how to do it when I use the submit button and it goes to a new page as:
<form name= "thisForm" action = "http://www.google.com">
<input name ="Submit" value="Go">
The onclick and onsubmit function call doesn't work here since it is going to a whole new page.
Also I need to save the Y cordinate value and send this to the new page.
Any help will be appreciated. Please give me an example if you can.
Thanks in advance
I am trying to load a new page after pressing the submit button and want it to be scrolled to a specific position when loaded.
I know it is very easy to use on the same page by using the window.scrollTo(x,y) function. It is also simple if I try to load a page at the beginning by calling the onload in the body tag:
<body onload = "scrollWindow()">
Just don't know how to do it when I use the submit button and it goes to a new page as:
<form name= "thisForm" action = "http://www.google.com">
<input name ="Submit" value="Go">
The onclick and onsubmit function call doesn't work here since it is going to a whole new page.
Also I need to save the Y cordinate value and send this to the new page.
Any help will be appreciated. Please give me an example if you can.
Thanks in advance