problem of using onload function for body in JSF

I wrote a javascript in onload function of body such as setting the scroll bar position.

If I set the onload property of body1 through JSC IDE, It works only when the page is displayed at the first time. But it does not work when the page is post back. WHY?

I need to use getBody1().setOnLoad(...) to do something dynamically. It does not work at all. How to fix this?

Any help is appreciated,

[418 byte] By [field] at [2007-11-26 11:07:19]
# 1

I found something interesting about the onload function in JSF.

When a page is displayed at the first time, the body tag is as follows:

<body id="body1" style="-rave-layout: grid" onload="window.scrollTo(0, 1000);"> -- scrollbar setting works

After any action, the body tag in the post-back page is as follows:

<body id="body1" style="-rave-layout: grid" onload="window.scrollTo(0, 1000);; return body1_jsObject.setInitialFocus();" onunload="return body1_jsObject.setScrollPosition();"> -- scrollbar setting does NOT work at all.

How to remove the .setinitialFocus()? or Can I set the initial focus to the bottom of a page similar to setting scrollbar position to the bottom?

thanks,

field at 2007-7-7 3:21:34 > top of Java-index,Development Tools,Java Tools...