View Single Post
Old 10-13-2007, 05:37 PM   #3 (permalink)
CMellor
The Acquainted
Upcoming Programmer 
 
CMellor's Avatar
 
Join Date: Sep 2007
Location: Leeds, UK
Posts: 141
Thanks: 6
CMellor is on a distinguished road
Default

Hey,

I tried your method:

Code:
function checkPass(element) {
	  $(element).request({
	    onSuccess: function(transport) {
		  if(!$F('currentPassword')) {
		    return false;
		  }
		  else if(transport.responseText == 2) {
		    throw 'Your given password is incorrect';
			$('currentPassword').activate();
		  }
		}
	  });
	}
	
	function validate() {
	  try {
	    checkPass(this);
		updateSpryForm(this, 'Your password was changed. You have been logged out, please log back in with your new password', false);
	  }
	  catch(exception) {
	    alert(exception);
	  }
	}
When I click the submit button, it brings up an error and says TypeError: $(element).request is not a function
__________________
Not quite a n00b...
CMellor is offline  
Reply With Quote