In my first foray into DOM scripting, I need a little assistance. I'm attempting to place an img element after an input tag (which has an id).
Code:
var loadingImg = document.createElement('img');
loadingImg.setAttribute('id', 'workimg');
loadingImg.src = '/new/images/working.gif';
document.getElementById('username').appendChild(loadingImg);
Basically it's temporary feedback to tell the user that their request is "working". I'm not quite sure how to place the image element after the username element however. Ideas?