Test Page: http://www.eojmarket.com/index.php?pag=26

Code below:

<script language="JavaScript">
function function1(){
window.scrollTo(0,265);
}
</script>
<input type="button" value="Go" onClick="function1();">

Question: Is it possible to get rid of the button and have it scroll to 0,265 on page load ?

Comment: <body onload="function1();"> doesn't appear to work.

Problem solved with the below...

<script language="javascript">
window.onload = function function1(){
window.scrollTo(0,265);
}
</script>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.