There are a few threads on here about this. I'm also running JQuery on my site and want to get validation running. I guess there are 2 options:
1) Code my own validation routine in Jquery
2) Use the jQuery.noConflict method.
Now the first item could take some time (which I don't have right now) so let's look at the second.
I currently use the following in my template:
This works fine as there is a conflict between Mootools and JQuery. The code has to be run once all of the script have been loaded. The problem we have is that the Chronoforms validation is inserted into script tags half way down the page (see chronocontact.html.php). What we need to do is use the Joomla method
..to put the code in the header of the document. However, I can't get this to work. Can one of the admins take a look at this and see if they can get it working? I keep getting a JSite::getDocument is undefined error.
1) Code my own validation routine in Jquery
2) Use the jQuery.noConflict method.
Now the first item could take some time (which I don't have right now) so let's look at the second.
I currently use the following in my template:
window.onload = function()
{
//As we load Mootools we need to handle any namespace problems
jQuery.noConflict();
...jQuery stuff...
}
This works fine as there is a conflict between Mootools and JQuery. The code has to be run once all of the script have been loaded. The problem we have is that the Chronoforms validation is inserted into script tags half way down the page (see chronocontact.html.php). What we need to do is use the Joomla method
$document->addScript($mainframe->getCfg('live_site').'SCRIPTPATH');
..to put the code in the header of the document. However, I can't get this to work. Can one of the admins take a look at this and see if they can get it working? I keep getting a JSite::getDocument is undefined error.
This topic is locked and no more replies can be posted.