Jump to content

why is this undefined?


ricmetal

Recommended Posts

the error message is a just popup saying "undefined"

 

<div id='usr".$OID."' contentEditable='true' onblur='alertMe(this)'>".$userVar."</div>

 

function alertMe(theDiv){
   var divId = theDiv.id; // when i alert divId i get the div's id
   var joe = document.getElementById(divId).innerText; //this is undefined, why?
   alert(joe);
}

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.