Hi Everyone,
I have taken one Radwindow and have a rad editor displayed in that window.
Now with the help of javascript i taking a reference to the editor and passing the html content from the window to the form.
Here is the javascript in the RadWindow having editor
OnClientClose event of the RadWindow and i taking the value of the Editor and savin in the database.
Code for OnClientClose is below :
The problem is :
When i type normal text without any formatting like making it bold,underline etc i am ABLE to get the value.
But when i add the Bold, underline etc it FAILS with error:
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occured while processing the request on the server. The status code returned from the server was: 500
I am unable to figure out the problem. What i think is it is not able to parse html tags like "<,>,/" etc thats why its failing to send the content.
Can you please provide a solution or feedback
Thanx.
Huzefa
I have taken one Radwindow and have a rad editor displayed in that window.
Now with the help of javascript i taking a reference to the editor and passing the html content from the window to the form.
Here is the javascript in the RadWindow having editor
| function saveClicked() |
| { |
| var editor = $find('ReditorGc')//GetRadEditor("ReditorGc"); //get a reference to RadEditor client object |
| var oValue = editor.get_html(false); //get the HTML content |
| oValue = oValue.replace("<","<"); |
| oValue = oValue.replace(">",">"); |
| var oWindow = GetRadWindow(); |
| var arg = new Object(); |
| arg.content = oValue; |
| oWindow.argument = arg; |
| oWindow.Close(); |
| } |
| function GetRadWindow() |
| { |
| var oWindow = null; |
| if (window.radWindow) oWindow = window.radWindow; |
| else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; |
| return oWindow; |
| } |
OnClientClose event of the RadWindow and i taking the value of the Editor and savin in the database.
Code for OnClientClose is below :
| sScript.Append("function OnClientClose(radWindow){if(radWindow.argument){alert(radWindow.argument.content);document.getElementById('" + hfPropertyChanged.ClientID + "').value = radWindow.argument.content;__doPostBack('" + hfPropertyChanged.UniqueID + "','');}}"); |
| Telerik.Web.UI.RadScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "OnClientClose", sScript.ToString(), true); |
The problem is :
When i type normal text without any formatting like making it bold,underline etc i am ABLE to get the value.
But when i add the Bold, underline etc it FAILS with error:
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occured while processing the request on the server. The status code returned from the server was: 500
I am unable to figure out the problem. What i think is it is not able to parse html tags like "<,>,/" etc thats why its failing to send the content.
Can you please provide a solution or feedback
Thanx.
Huzefa