I have gotten past the first step using FCK editor but it is giving me one problem with my current practice:
For all my form elements, I add this attribute onchange="detectChange=1;" which then allows me to be interactive when the user click the "close" button, so for example where change is detected and they click close I can do a javascript confirm "you have made changes - are you sure?"
However, how do I bind an onchange event to the field that fckeditor is managing? I have not gotten anything to work on this. Also, all my other fields are, if the name of the field is Address, then id="Address" also and how do I set id="[fieldname]" for the fck field as well? (so that I can access with javascript)
Many thanks, this is my first post..
For all my form elements, I add this attribute onchange="detectChange=1;" which then allows me to be interactive when the user click the "close" button, so for example where change is detected and they click close I can do a javascript confirm "you have made changes - are you sure?"
However, how do I bind an onchange event to the field that fckeditor is managing? I have not gotten anything to work on this. Also, all my other fields are, if the name of the field is Address, then id="Address" also and how do I set id="[fieldname]" for the fck field as well? (so that I can access with javascript)
Many thanks, this is my first post..

Re: very simple question - setting onchange action
I understand that fck puts the editor in an iframe, and at least on posting the form, the edits are passed by field name to a hidden field in the parent form.
Is there any way to do a javascript logic that would ask, basically
if(hiddenfield.value !== iframe.editArea.innerHTML){ //then some editing has been done, i.e. change detected }I'm just not sure how to declare the arguments on that. Please help, thanks
Samuel
Re: very simple question - setting onchange action