weightinwildcat
Programmer
I am wokring on code to cause a page to automatically scroll down so users can see the results of a query. Thus far I have tried adapting several Javascript code samples. I can make an alert work OK, but I would like to replace it with something that actually brings a person down to where the results are.
Here are the samples I have tried to adapt:
document.getElementByName('contactinfo').focus()
document.getElementById('jumpdown').scrollIntoView(true)
window.location.hash="contactinfo"
var el = document.getElementByName('jumpdown')
el.scrollIntoView(true)
window.location="index.php#jumpdown"
Any ideas as to why these are not working?
Here are the samples I have tried to adapt:
document.getElementByName('contactinfo').focus()
document.getElementById('jumpdown').scrollIntoView(true)
window.location.hash="contactinfo"
var el = document.getElementByName('jumpdown')
el.scrollIntoView(true)
window.location="index.php#jumpdown"
Any ideas as to why these are not working?