NCoder
NCoder

Reputation: 335

Form Button Submit IE Issue

I have a form that is submitted by a button like this:

<input type="submit" form="billing-form" value="xyz" name="abc">

That submits a form like this:

<form method="POST" id="billing-form" action="something.php">

//bunch of fields here

</form>

The button submits the form fine in most browsers except IE.

Any ideas how to make this work in IE?! The button unfortunately has to be outside of the form itself which is why I'm using the billing-form name to reference.

Thanks,

NCoder

Upvotes: 0

Views: 41

Answers (2)

joelmdev
joelmdev

Reputation: 11773

Not going to work with the submit button outside the form without using javascript. See This question and answer.

Upvotes: 0

T J
T J

Reputation: 43156

Well if using simple script is not a problem then you can simply use an input button and submit the from using js

<input type="button" form="billing-form" value="xyz" name="abc" onclick="submitForm();">

function submitForm()
{
document.getElementById('billing-form').submit();
}

Upvotes: 1

Related Questions