Displaying 1 result from an estimated 1 matches for "checkrequir".
Did you mean:
checkrequired
2005 Oct 27
5
Problem passing event object
...function(chkbox) {
this.chkbox = chkbox;
this.chkbox.onclick = this.switchRequired.bindAsEventListener(this);
},
switchRequired: function(evt) {
this.evt = evt; // Set the event to a property
alert(this.evt);
var params = $F(this.chkbox);
var myAjax = new Ajax.Request(''server/checkRequired.html'',
{method: ''get'', parameters: params, onSuccess: this.switchPrompt
,onFailure: this.dontCheck}
},
switchPrompt: function() {
alert(this.evt); // Try to pick up the this.evt var, but it comes
bakc as undefined
},
dontCheck: function(response) {
// failure
}...