cfell
Posts: 10
|
Posted: 01/09/2004, 9:25 PM |
|
Has anyone used onChange events in conjunction with CCS ListBoxes (selects) in editable grids? I am having a bit of an issue getting onChange to fire when a new value is selected in the listbox. CCS Help shows a "check_and_bind( )" function being called from inside "bind_events( )" function that does not appear in my generated code. The generated code iterates thru a two-dimensional array, initialising "onChange" to the newly generated function created for handling custom code.
CCS 2.2.2.40 - java servlet (Model 2)
Any suggestions / assistance is greatly apprciated.
|
|
|
miko
Posts: 50
|
Posted: 01/09/2004, 11:50 PM |
|
I modified ExamplePack -> EditableAutoRows page and new row will be added if textbox or listbox will be chenged. This solution is not universal but provide the needed functionality and is very simple.
<select name="{manager_id_Name}" onchange="ShowNewEmptyRow(document.forms['departments'].elements['{department_name_Name}']);">
Best regards,
Michael.
_________________
Regards,
Michael |
|
|
ignat
Posts: 55
|
Posted: 01/10/2004, 3:07 AM |
|
"check_and_bind()" function is called only for Record forms. I bet there are other JScript errors on the page that prevent normal script execution.
Attached is the sample working HTML of EditableGrid with OnChange event saved from browser.
200401100307550.EGridSample.zip |
|
|
ignat
Posts: 55
|
Posted: 01/10/2004, 4:27 AM |
|
Oops, attachments doesn't work.
|
|
|
cfell
Posts: 10
|
Posted: 01/10/2004, 10:46 AM |
|
Thanks Mike. I modified the html and added onChange to my selects and it works (Doh!). I'm curious why adding custom code to the client-side on change event does not side-effect an onChange into the select. Hmmm.
Thank you Ignat for your insight, very helpful. I should know better than to implicitly trust what I read, to be aware of the subtleties.
|
|
|