In a jquery onclick event I modify the dom and then do a submit it doesn’t work in Firefox but works well in Chrome and IE.
function test(){
$('#b2').remove();
var form = document.getElementById("123");
form.submit();
}
$(function() {
$('#b1').on('click', test);
});
Here there is the minimal test case http://jsfiddle.net/Tjtjv/
Clicking in button test it should load the page http://jsfiddle.net
How can I make it works in Firefox like in Chrome and IE
Why do you want to remove the area with your button? If you don’t want that your users does not submit again the form, you should rather disabled the button :