开发者

cfdiv submit within another cfdiv submit, only works in FF

开发者 https://www.devze.com 2023-03-25 12:20 出处:网络
I have main page which has payment cfdiv, then in payment cfdiv I have shoppingCart cfdiv. Mainpage.cfm

I have main page which has payment cfdiv, then in payment cfdiv I have shoppingCart cfdiv.

Mainpage.cfm

<i><strong>PAYMENTS</strong></i>
<cfajaximport tags ="cfform,cfdiv">
<cfdiv 
  id="myPaymentDIV" 
  bind="url:Payments.cfm?Labware_TTL=#Labware_TTL#&Media_TTL=#Media_TTL#" 
  style="float:inherit" 
  bindOnLoad="true"
/>

Payments.cfm

<cfinput 
  name="payments" 
  value="Submit Payment" 
  type="submit"
  style="font-style:normal; font-weight:bold; color:##603"
>

<cfajaximport tags ="cfform,cfdiv">
<cfdiv 
  id="EditCartDIV" 
  bind="url:ShoppingCart.cfm?ReqID=#ReqID#&DoWhat=Default" 
  style="float:inherit" 
  bindOnLoad="true"
/>

ShoppingCart.cfm

<!---Add More Items--->
<a href="ShoppingCart.cfm?ReqID=#ReqID#&DoWhat=ADDMORE">
  <font style="color:##F00; font-weight:bold; font-style:normal; font-size:12px">
    ADD MORE
  </font>
</a>

&nbsp;&nbsp;

<!---Modify---->
<a href="ShoppingCart.cfm?ReqID=#ReqID#&DoWhat=MODIFY">
  <font style="color:##F00; font-weight:bold; font-style:normal; font-size:12px">
    MODIFY
  </font>
</a>

&nbsp;&nbsp;

<cfinput name="ReqID" value="#ReqID#" type="hidden">
<!---Delete--->
<cfinput 
  name="DoWhat" 
  value="RESET CART" 
  type="submit"
  style开发者_JAVA百科="font-style:normal; font-weight:bold; color:##F00"
  id="resercartID"
>

This works perfectly fine in FF but all other browsers continues with Payment's submit (Submit Payment).

Any help is greatly appreciated, thanks in advance.


It's because of <cfform> tag is missing in Payments.cfm and ShoppingCart.cfm...?


Make sure that you're not nesting forms inside each other with your cfdivs. For example, if your EditCartDIV cfdiv is inside the cfform tag from payments, then the submit button could get incorrectly associated with the wrong form.

Make sure you close one cfform before calling an AJAX container that contains another cfform.

0

精彩评论

暂无评论...
验证码 换一张
取 消