tags:

views:

485

answers:

2

I have a shoppingcart control that lists the items in cart. Each row has a delete submit button that is wrapped around ajax.beginform that will call the controller, delete the item in cart and render the shoppingcart as partialview. The ajax and deletion works fine in IE and Firefox. In firefox only, after the submit button is clicked and ajax call is made, submit button is no longer visible. In IE it is visible. Following is the html. Why is is behaving wierd in firefox?

<form action="/Order/DeleteShoppingCartItem?ProductID=2" 
      method="post" 
      onsubmit="Sys.Mvc.AsyncForm.handleSubmit(this, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, updateTargetId: 'divTopRight' });">
    <td style="vertical-align:middle">
        <button type="submit" id="add-item-button" style="font-size:8px">X</button>
    </td>
</form>
A: 

Are you wrapping your Ajax.BeginForm in a using statement? Are you sure you have your braces set properly? Sounds like you might be losing a form tag because of this. If so, can you post your view code instead?

RailRhoad
A: 

Using Ajax.Actionlink instead of wrapping a submit button around Ajax.BeginForm solved the issue.