Vasiliy
Posts: 378
|
| Posted: 04/03/2006, 2:08 PM |
|
ASP/PHP
Event: Before Show
I want to add some JS code for a control in Editable Grid.
So I hace a check-box in editable grid. How to add a JS code for each check-box in each row?
Again:
EditableGrid -> CheckBox -> event "onChange", add specific JS code for each row in a grid.
Does anybody know how to do this in CCS?
_________________
Vasiliy |
 |
 |
Benjamin Krajmalnik
|
| Posted: 04/03/2006, 2:31 PM |
|
Vasily,
I have not tried this (one of the few that I have not!), but have you
checked about doing something in JSON (Javascript Object Notation)?
Let's say that your element is called mycheckbox in a form called myform
Then, you would change its value as follows:
myform.mycheckbox.onchange = thenewcode
Now, to integrate it into the framework, I would create a label manually in
the script are on the client side onload.
Then, you can dynamically set its value in the beforeshow of your chechbox
(or anywher elase, for that matter!).
We'll call the label "myscript"
Something like:
<ASP>
myscript.value = "myform.mycheckbox.onchange = ""javascript:alert(""Value
Changed!"");"""
</ASP>
HTH
|
|
|
 |
efficinet
Posts: 7
|
| Posted: 04/03/2006, 8:01 PM |
|
Wouldn't you add that directly to the checkbox form control in the HTML window?
_________________
Efficinet Inc.
www.efficinet.com |
 |
 |
Vasiliy
Posts: 378
|
| Posted: 04/03/2006, 9:44 PM |
|
Benjamin,
thank you, sounds like a solution. I'll try it.
To efficinet: nope, won't work.
_________________
Vasiliy |
 |
 |
Benjamin Krajmalnik
|
| Posted: 04/04/2006, 4:51 PM |
|
Not a problem.
I use this technique to set fields as read only, hide div's based on the
current mode for the page, etc.
|
|
|
 |
|