stockton Posted September 5, 2007 Share Posted September 5, 2007 In my HTML page that calls Ajax I have a field defined as:- <td width=195 style="position:absolute; visibility: hidden;" id="CNumber" name="CNumber"></td> and in Ajax I attempt to retrieve its contents by :- var KaartNommer = document.getElementById("CNumber").innerHTML; and I have also tried:- var KaartNommer = document.getElementById("CNumber").value; both fail and doing an alert() I get told that it is undefined. Please tell me how I got this wrong as other field values on the same webpage defined & retrieved in the same manner work fine. Link to comment https://forums.phpfreaks.com/topic/68040-solved-failing-to-retrieve-data-from-html/ Share on other sites More sharing options...
stockton Posted September 7, 2007 Author Share Posted September 7, 2007 Due to pressure of deadlines I have given up on Ajax/Javascript and am using php session variables and have thereby resolved the problem. Link to comment https://forums.phpfreaks.com/topic/68040-solved-failing-to-retrieve-data-from-html/#findComment-343611 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.