[Javascript/HTML]Jump to anchor AND execute javascript?
I've got a javascript function "sendRequest" that I wrote which replaces a div called "article" in my page with text given to it by a PHP function. They're news articles.
The articles themselves also have the links javascript:sendRequest('articlename');" in them. If the user has scrolled far down in the document and clicks the link, it replaces the div with the new article. However, it doesn't jump to the top like typical Web users would expect. Is there a way to jump to a #id within the page after calling the javascript div replace?
Thanks in advance.
__________________
"I'm typing on a computer of science, which is being sent by science wires to a little science server where you can access it. I'm not typing on a computer of philosophy or religion or whatever other thing you think can be used to understand the universe because they're a poor substitute in the role of understanding the universe which exists independent from ourselves." - Willravel
|