Ivan Golubar
asked on
Ajax success function not processing of "document.getElementById" function
Next is from header:
"Alert" gives me right answer from DB. What is then wrong in my code? I don't get anything in "select " element.
Select project from the list: <select id="selectProjectID" onfocus="onFocusSelectProject()">
</select></br></br>
And next is ajax call. function getLastOpenedProject(){ //_____________getLastOpenedProject(){
$.ajax({
method:"POST",
url: '/wp-content/themes/net4/PgetJson.php',
data: {
"getLastOpenedProject":1,
"weGotTheuser":weGotTheuser
datatype: "text",
success: function(strdate){
var selectProject3 = document.getElementById("selectProjectID");
selectProject3.value=strdate;
alert(strdate);
}
});
}
"Alert" gives me right answer from DB. What is then wrong in my code? I don't get anything in "select " element.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER