خرید بک لینک

Vote count: 0

I cant understand why this is not working.

I have an input in my site wich is filled by an ajax request.

I would like to fill it with htmlCode, but it's empty when tried.

<form name="form" id="form" method="post" action="secondpage" />

  <input type="hidden" name="htmlCode" id="htmlCode"/>  

</form>


$.ajax({
url : url,
type: "POST",
async: true,
data : {
  "requestData": JSON.stringify(request) 
},
success: function(data, textStatus, jqXHR){ 
  var response = data.methodResult;
  alert(response.htmlCode);
  document.getElementById("htmlCode").value = response.htmlCode;

},
error: function (jqXHR, textStatus, errorThrown) {

} 

});

the alert shows the htmlCode, so, I'm sure it exists.

I read the variable in jsp:

System.out.println("htmlCode Value - " + request.getParameter(htmlCode));

And this is empty.

If I change the REST server, and retus "hello" instead of htmlCode it is filled.

Is there any forbidden character I'm trying to set or something?

asked 5 mins ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 5 خرداد 1395 ساعت: 18:11

صفحه بندی