Am trying to do a pretty simple Javascript that worked fine in CF4. I have a checkbox that when clicked will copy info from text1 to text2.
----------
In CF4 I had the Javascript in the 'On Load/Load JS' and it was set up as 'domready' event for the window. So it looked like this:
window.addEvent('domready', function() {
$('id_cb1').addEvent('click', function(){
.... do the copy stuff ....
}}
When the checkbox was clicked it copied or cleared some fields on my form.
-----------
In CF6 I'm doing something wrong.
I put my function into a Javascript field and checked the 'add inside domready' and gave it a name.
function copy_tc(){
... do the copy stuff....
}
and then in the checkbox event area, I selected 'click' put the name of the function in the Element Identifier (see pic).
Am probably missing something obvious or have something syntactically wrong, but have iterated thru quite a few options, searched forums and perused manual before posting this.
----------
In CF4 I had the Javascript in the 'On Load/Load JS' and it was set up as 'domready' event for the window. So it looked like this:
window.addEvent('domready', function() {
$('id_cb1').addEvent('click', function(){
.... do the copy stuff ....
}}
When the checkbox was clicked it copied or cleared some fields on my form.
-----------
In CF6 I'm doing something wrong.
I put my function into a Javascript field and checked the 'add inside domready' and gave it a name.
function copy_tc(){
... do the copy stuff....
}
and then in the checkbox event area, I selected 'click' put the name of the function in the Element Identifier (see pic).
Am probably missing something obvious or have something syntactically wrong, but have iterated thru quite a few options, searched forums and perused manual before posting this.
