I have the following code, which works fine in FF, but the .append()
function s cauding an error in IE. Is anyone able to tell me if there is anything wrong with my code, or if this is an IE problem?
The purpose is to add a hidden field to a form (will be different depending on what the user clicks), and I then submit the form.
$(function(){
$('a.js-make-profile-image').click(function(){
$('.append-here').append('<input type="hidden" name="action-type" value="profile-image" />');
document.forms['attachment-action-form'].submit();
});
});
The IE debugger is giving the error Unexpected call to method or property access
, and this text is being hightlighted within jQuery by the debugger - this.nodeType===1&&this.appendChild(a)
.