I have a button in a button menu that submits an Ajax call to the backend to run a series of programs. I have a weird thing happening - it appears that the call is being initiated twice - each call within 3 microseconds of the other. Is it possible that a double-click on a button that is only supposed to be single-clicked is the culprit?
It's an old non-MVC app using Ext JS 3.4. Here's the button and Ajax request:
Thoughts?
Thanks,
Eva
It's an old non-MVC app using Ext JS 3.4. Here's the button and Ajax request:
Code:
id: 'btnOptionsMenu', text: 'Order Options', iconCls: 'hfi_shoppingBasket', menu: { items: [{ id: 'btnSbmt', text: 'Submit This Order', iconCls: 'hfi_arrowRight2', handler: function(){ var totDollars = orderAmt + POPAmt; totDollars = formatCurrency(totDollars); var totPallets = orderCubes / 100; totPallets = round(totPallets,2); Ext.Msg.confirm('Submit Order?', '<b>Order Total: </b>' + totDollars + '<br><b>Pallet Total: </b>' + totPallets + '<br><br>Submit completed order?', function(button) { if (button == 'yes') { fnSubmitOrder(); } }); } and so on.... . . . function fnSubmitOrder(){ Ext.Ajax.request({ url: 'vvcall.pgm', params: { pgm: 'SPR4001A', action: 'submitOrder', orderNbr: orderNbr, date: orderDt, cust: custNbr, }, success: function(response, options){ var check = response.responseText; if (check) { and so on... . . .
Thoughts?
Thanks,
Eva