Forums

Problem with StrongPass

goliath 10 Jun, 2014
I use the StrongPass script that was used and described here: http://www.chronoengine.com/faqs/58-cfv4/cfv4-elements-and-html/3802-how-can-i-add-a-password-stength-check.html

I followed the exact procedure that was written there. In the beginning, the script worked just fine. But today I checked it again and I see that the script doesn't work anymore. I receive a "Uncaught ReferenceError: StrongPass is not defined" error.

How can I change this?
GreyHead 10 Jun, 2014
Hi geertmartens,

It sounds as though the Strong Pass file isn't being loaded. So either the file isn’t there or the code to load it has been broken somehow. That is
$doc->addScript(JURI::root().'components/com_chronoforms/extras/StrongPass.js');


Bob
goliath 11 Jun, 2014
Hi Bob

The script is there though. I re-entered the code you mentioned above again, but still no effect.
GreyHead 11 Jun, 2014
Hi geertmartens,

Nothing much else that I can say from the information here :-( Please post a link to the form so I can take a quick look.

Bob
goliath 11 Jun, 2014
Hi Bob
I send the link in a PM to you now.
Regards
Geert
GreyHead 11 Jun, 2014
HI geertmartens,

Ah, this is a timing problem in Joomla! 3 - the StrongPass code is being loaded before the MooTools library. Please add this extra line in the Load JS action:
<?php
JHtml::_('behavior.framework', true); // << add this line
$doc =& JFactory::getDocument();
$doc->addScript(JURI::root().'components/com_chronoforms/extras/StrongPass.js');
?>
window.addEvent('domready', function() {
  new StrongPass("password_1");
});
Hopefully that will fix the problem.

Bob
goliath 11 Jun, 2014
Update: It works!
This topic is locked and no more replies can be posted.