Go to the top of a web page when it refreshes?

Hi there,

I have a web form where changing a ComboBox field will refresh the page. It works well but the page then scrolls down to where the combobox is…and I’d like the page to stay scrolled to the top. Can anyone give me a tip? I’ve searched the forums.

Thanks…Neil

Subject: I assume I have to put code in the onLoad Javascript event, but what?

Subject: Try this

I assume that you have checked the “Refresh fields on keyword change” of the ComboBox field. Maybe you can try to uncheck that box and use the javascript code to do the refresh. Go to onChange event of your ComboBox field, and write down the following javascript:

_doClick(‘$Refresh’,this,null);

Save it and preview your form. If this doesn’t work, try to add another line like this:

_doClick(‘$Refresh’,this,null);

window.scroll(0,0)

This works for me, but it really depends on the design of your form (say if you have some javascript code somewhere else) and the browser you’re using. Or, maybe try to put

window.scroll(0,0)

into the onload event and see if that solves your problem. Good Luck.