I need a script to auto scroll a page... GO!


I have posted about this problem previously in an attempt to use JS (found here: http://www.sitepoint.com/forums/showthread.php?870541-how-can-i-make-the-page-scroll-to-the-top-when-a-video-is-clicked&referrerid=533151) but the JS to do this was interfering with (absolutely necessary) JS already on my page.

Im hoping someone can point me in the direction of a PHP script that will make the page scroll to the top when an existing link is clicked on.

further details can be found in the thread referenced above.


a php script to make videos load in the large player at the top of the page (replacing the existing playback JS so the scrolling JS will work).

Any takers?

I have very little php experience.

This can only be done with Javascript.

first of all, which part?

secondly, i want a second (and possibly third) opinion bc ive seen the things PHP can do and i dont see php being that limited.

PHP can only generate HTML for the browser, any interaction after the page has loaded(like scrolling) happens in JavaScript.

I’ve answered your question in the other thread.