I am trying to set the inner html value of a field and that works fine but when I try to retrieve it it fails.
My code:
var butId = buttonPressed.getAttribute('id');
$('#will'+butId).remove();
$('#hidDelete').html(butId); //THIS WORKS FINE
var temp = $('#hidDelete').html(); //THIS DOESNT
alert (temp); //THIS PRINTS NOTHING
My input field:
<input id="hidDelete" type="hidden" name="hidDelete"/>
Can anyone see whats wrong with it?
try
$('#hidDelete').val()instead ofhtml()