I have a complicated view that holds another partial view. The partial view has a submit button.
The submit button and everything works fine in Chrome but in Firefox, even though Firebug shows no errors, absolutely nothing happens when I click the submit button.
Are there any typical issue to be aware of here? Maybe Chrome is more lenient with Javascript errors?
Anyone got any idea what could be happening?
The views are pretty huge so will not post everything
Edit: I will post the view with the submit button. I have put a form in a table to capture the values that I want to save:
<table>
<tbody>
<tr>
@using (Html.BeginForm("RowPost", "Controller"))
{
<td class = "editor-field">
@Html.EditorFor(model => model.Minutes)
@Html.ValidationMessageFor(model => model.Minutes)
</td>
<td>
@Html.DropDownList("WorkType")
</td>
<td>
@Html.TextAreaFor(model => model.description)
@Html.ValidationMessageFor(model => model.description)
</td>
<td>
<input type="submit" value="Save" />
</td>
}
</tr>
</tbody>
</table>
Maybe its something to do with the form inside a table row?
Your view is not well formed and will result in invalid HTML, which in turn causes undocumented behaviour.
Results in something like:
which is obviously not ok. You shouldn’t be putting forms inbetween rows and cells. Try putting the entire table inside the form for more predictable results.
In future you could save yourself lots of headaches if you get to know and love the WC3 Markup Validation Service. If your html fails that, then get it fixed before worrying about anything else.