Possible Duplicate:
Move focus to a particular field
This should be an easy one. I'm trying to set the focus onclick to a <p>
element on my page.
My javascript looks like this:
function loadSubmit() {
if (document.getElementById('uploaded_file').value == "") {
this.setFocus("name");
} else {
var ProgressImage = document.getElementById('progress_image');
document.getElementById("progress").style.visibility = "visible";
//document.getElementById("progress").focus(); ?
setTimeout(function () {
ProgressImage.src = ProgressImage.src
}, 100);
}
}
I would like to shift the focus of the page to 'progress_image' any suggestions on how to accomplish this?
Thanks
?
– Kinburn101 Aug 31 '12 at 18:59