i have a scenario where i am trying to read the value within a div in a html page and pass that value to a server via ajax:
var formname = document.getElementById('username').innerHTML;
however it seems as though the dom is generated before the html stuff is complete therefore the variable formname contains null and not "paulSm". Is there any way around this problem?
Any help you can give me would greatly be appreciated