Welcome Guest, Not a member yet? Register   Sign In
getElemntbyid returns undefined value
#5

(08-27-2018, 01:49 AM)kvanaraj Wrote: var txtSecondNumberValue = document.getElementById('texttwo_'+rowid).value;
return indefined value in javascript. but in the POST values working . need suggestion

Display 'texttwo_'+rowid result and check if this element exists. Using of jQuery and other libs will not help if the element with this ID is not exists.

Just call console.log('texttwo_'+rowid) before call document.getElementById to check what element you try to get.

If document.getElementById returns null, then that element is not exists or hasn't created yet if it is a dynamical element.
Reply


Messages In This Thread
RE: getElemntbyid returns undefined value - by Vitaly83 - 08-27-2018, 11:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB