The radEditor has a clientside api called setFocus, thats supposed to set focus to the control. I'm not much of a javascript programer, so I would like to make a function from serverside code with a parameter for the actuall radEditor control to set focus to this control.
On the serverside we could set the function by something like:
In the masterpage we have this function:
On the serverside we could set the function by something like:
ClientScript.RegisterStartupScript(Me.GetType, "Key", sb.ToString)
Where the actual function is buildt with stringbuilder.In the masterpage we have this function:
| <script type="text/javascript" language ="javascript" > |
| function SetEditorFocus(id) { |
| var editor = document.getElementById(id); |
| editor.setFocus(); |
| return true; |
| } |
| </script> |
Is this function ok?
If it's ok, what to put into the stringbuilder to get this to work from serverside?
