Ricky
Ricky

Reputation: 23

jquery function .submit() cannot post the data in IE

I have a form like this

<li id="li-298056">
<form id="form-298056" method="POST" action="tab_board.php">
<div class="titre_4">CAMPAGNE ANTIGONE</div>
......
<input type="hidden" value="298056" name="lot_id">
</form>
</li>

I use the .submit() to submit the the form

$('#li-298056').click(function(){
    $('#form-298056').submit();
});

This works well ffx. In the IE browser i cannot get the post values in the action page. It display an error 'syntext errors'. But if i start the developpment tool of IE, and start to debug the javascript or select the li block then it works. How to solve this?

Upvotes: 2

Views: 1112

Answers (1)

vzwick
vzwick

Reputation: 11064

There is a known bug in IE that prevents a form from being submitted when there is no submit element inside. Try adding

<input type="submit" value="submit" style="display:none" />

to your markup and see if it works.

Upvotes: 3

Related Questions