Tag: User false null
Blocking web-side double-click mouse Generation problem
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/80/7C/wKiom1dCwxTTMAPnAAA_yaEXx04739.png "title=" produce a problem case "alt=" Wkiom1dcwxttmapnaaa_yaexx04739.png "/>650) this.width=650; src=" http://s3.51cto.com/wyfs02/M00/80/7A/ Wkiol1dcxovdg4gbaacsxarzz0m086.png "title=" problem phenomenon "alt=" wkiol1dcxovdg4gbaacsxarzz0m086.png "/>
As can be seen from the above two pictures, if the user mistakenly double-click the "Confirm Payment and Insurance" button, it will appear as a phenomenon. How to eliminate this phenomenon?
I think of the workaround: When the Click event is invoked, a flag switch is set, and the flag type is a Boolean with the default value of True and is a global variable. Flag is placed in the IF statement, and when the first click Triggers the event, flag is set to FALSE and the Click event binding method is executed. So, when the user clicks the second time, flag is false, does not execute Click event Binding method. This effectively avoids the problem.
var journeydetail = widget.extend ({Implements: governmentprocurement,attrs : {apvruleaction : ', Apvrule : null,journeyno_ cipher : null,corpcode : null,selectapver : ',approvalurgency : ' 0 ', Underlineaction : null,orderreturnaction : null,cancelaction : null, sendemailaction : null,jourstate : null,psgremark : null,returnreason : null,airitemtktlaction:ctx+ '/journey/json/airitemtktl.html?requesttype=ajax ', hotelManualAction:ctx+ '/ Hotel/json/hotelmanualconfirm.html?requesttype=ajax ', querypayurlaction:ctx+ '/pay/json/alipay/ Getdirectpayurl.html?requesttype=ajax ', queryemergencypayurlaction:ctx+ '/pay/json/alipay/getdirectpayurl.html? Requesttype=ajax ', querypaytktlaction:ctx+ '/pay/json/alipay/gettktl.html?requesttype=ajax ', singleTradeQuery:ctx + '/pay/json/singletradequery.html?requesttype=ajax ', queryairitemdetail:ctx+ '/journey/tc/queryairitemdetail.html?requesttype=ajax ', refundhoverlistaction:ctx+ '/pay/json/ Refundhoverlist.html?requesttype=ajax ', Defaultapvers:null,containerhight:null,validatorrefund: ',/** to pay an emergency review add logo */approvalurgencypayed: ' 0 ', //emergency payment has been paid approvalurgencynopayed: ' 0 ',//emergency awaiting payment Urgencyapvcache : null , //emergency check-in cache TCEMERGENCYPAY:FALSE,//TC emergency and paid trip/** judging GP insurance button clicks */gpinsureclickcount:true},             /**************************GP Insurance Payment Start * * Check GP Insurance Information */$ (' #gpInsurePayDialog '). On (' click ', Function () {$ (' # Gpinsurepaydialog '). addclass (' flow-btn disabled-btn '), if (Th.get (' Gpinsureclickcount ')) {Th.set (' Gpinsureclickcount ', false); Governmentprocurement.gpinsurepaydialog ();}});
This article is from the "little Tomato Potato Fantasy" blog, please be sure to keep this source http://9victor9.blog.51cto.com/10800051/1782198
Screen the user double-click button to generate a subsequent Click event recurrence problem