...

View Full Version : event OnClick sends user to Top Of Page



babycam
03-03-2005, 11:54 PM
A finishing touch on a page.

I have a pop up with CALCULATE button. The page content is longer than the height of the pop up window. Therefore when the user clicks on CALCULATE the page is refreshed and goes to the top of the page.

The issue for me is that when the user calculates they have to scroll back to the bottom of the page to see the results.

Q) How do I maintain the page's horizontal position onClick? Or (even better) have the page sent to the bottom of the page onClick not the top.

http://www.finser.com.au/content/calculators.php …
Then click Retirement Calculator…
Then click Case A
(it’s a process (sorry))

_Aerospace_Eng_
03-04-2005, 12:02 AM
u can try something like this

onclick="window.scrollTo(0,screen.height)"

hemebond
03-04-2005, 12:27 AM
onClick="MM_swapImage('calc','','btn_c_Calc.gif',1);MM_callJS('superCalcA()');return false"That is some awful code.

liorean
03-04-2005, 12:29 AM
It's what you get for using DreamWeaver's built in scripts instead of a professional script.

babycam
03-04-2005, 12:43 AM
It's what you get for using DreamWeaver's built in scripts instead of a professional script.

Any suggestions???

RE: hemebond's response - it works. but ideally i want to go to the bottom of the page. This will be a good fall back.
>>Aweful code - Hey this was my first site!


RE: _Aerospace_Eng_ response - the result is that it jumps to the bottom of the page then back to the position where the user was last.

hemebond
03-04-2005, 02:16 AM
Try this
href="#lsRet"or put an id attribute on the result title row, and point to that. Remove the
return falseif you do this.

babycam
03-04-2005, 02:20 AM
>> href="#lsRet"

SPOT ON TIGER. nice one... :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum