In terms of Joomla, I needed a password indicator that signalled if a strong enough password has been entered or not. I currently have the following script which is helping the process..

take a look in /media/system/js/validate.js 

I originally had my own onchanged event and looking out for either password field getting this. On this event I checked the current password and then depending appended dynamic html using javascript a message that alerted the user as to the strength. I also set a boolean which would be true if the password passed the regular expression test for the most stringent regex.