javascript - Getting Spring Web Flow to work with IE 7 forms -
this continuation of this question, refocused after debugging on spring web flow , processing of events in spring web flow.
i've got problem spring web flow , internet explorer 7, , ie 11 in "compatibility mode." i've verified problem, don't know how fix it.
i have web flow form multiple buttons on wired using javascript onclick() handler because they're type='button'
, not type='submit'
:
<button id="addcurrentaccount" name="_eventid_addcurrentaccount" type="button" value="addcurrentaccount" class="buttonactivity add"> <span>add current account</span> </button>
this supposed happen: depending on button clicked, different web flow events fired when form submitted. example, button marked "delete account" should fire event named "_eventid_deleteaccount". button marked "create account" should fire event named "_eventid_createaccount".
this works on ie 8 through 11, chrome , firefox. however, on ie 7 , on ie 11 in "compatibility mode", every button on page submitted along form. means form comes in several "_eventid_xxx" request parameters, , since first 1 "_eventid_createaccount", every button on page creates account on form.
is there simple fix this? (and, no, "don't use web flow" or "don't use ie 7" not options, unfortunately.)
try specifying eventid exclusively in javascript function as:
function includeevent(eventid){ document.getelementbyid("yourform")._eventid.value = eventid; document.getelementbyid("yourform").submit(); }
include _eventid hidden type:
<input type="hidden" name="_eventid" value="continue"/> <button id="addcurrentaccount" name="addcurrentaccount" type="button" value="addcurrentaccount" class="buttonactivity add" onclick="javascript:includeevent('addcurrentaccount')"> <span>add current account</span> </button>
this way can make sure when user clicks on enter button default "continue" event generated need customize how handle it. based on each provided button click, respective event(see passing parameter javascript function) set javascript function mentioned.
Comments
Post a Comment