Hi Bob
I have at last begun to get to grips with jQuery but am having trouble how to include in CF5. What I wanted to do was to set up a library of functions on one Load Javascript and then calls to functions defined in that library in subsequent Load Javascript boxes. as per the attached form which is installed http://build550.pmhu3adv.org.au/index.php/test-bed-jq..
My sample form is attached, The code is awful simple
This in one load javascript in the JS Code box
and this in the next - again in a load javascript box
I have also included the code for that.
The call to sayGday works fine in the first box but the second gives me
I suspect it is some matter of visibility of functions - scope and that - which I have missed. There are several things I could try and I can see how to solve this specific problem but you might perhaps give me a swift kick along with the general case. ๐
Regards
Nick
I have at last begun to get to grips with jQuery but am having trouble how to include in CF5. What I wanted to do was to set up a library of functions on one Load Javascript and then calls to functions defined in that library in subsequent Load Javascript boxes. as per the attached form which is installed http://build550.pmhu3adv.org.au/index.php/test-bed-jq..
My sample form is attached, The code is awful simple
This in one load javascript in the JS Code box
<?php
require_once(
'components/com_u3aV5/membership/js/jQueryLibrary.js'
);
?>
and this in the next - again in a load javascript box
jQuery(document).ready(
function (jQ) {
sayGday();
} // function (jQ)
); // jQuery(document).ready;
I have also included the code for that.
The call to sayGday works fine in the first box but the second gives me
ReferenceError: sayGday is not defined
sayGday();
I suspect it is some matter of visibility of functions - scope and that - which I have missed. There are several things I could try and I can see how to solve this specific problem but you might perhaps give me a swift kick along with the general case. ๐
Regards
Nick