Hi,
I am using extensions\wpresources\RadEditorSharePoint\4.5.4.0__1f131a624888eeed .
In moss, I want implement popup new windows for Links inside rad editor, I want to mention custom width n height ( They may chage in next developemnt)
trial -1:
I tried to use window.open directly inside radwindow bt it didn't worked out, this piece of code striping by itself.
trial -2
I gone through yur foum and you are using OnclientLoad javascript method for window.open
So I tried to implement it. see below :
On page layout
<script type="text/javascript">
function OnClientLoad(editor)
{
editor.attachEventHandler ("onclick", function (e)
{
var sel = editor.getSelectedElement(); ; //get the currently selected element
var href = null;
var ele = document.getElementById("popupwindow");
if (ele)
{
if (sel.tagName == "A")
{
href = sel.href; //get the href value of the selected link
window.open(href, null, "height=500,width=500,status=no,toolbar=no,menubar=no,location=no");
return false;
}
}
});
}
</script>
For telerik:
<telerik:RadHtmlField id="pagecontent" FieldName="PublishingPageContent" runat="server" AllowSpecialTags="true" OnClientLoad="OnClientLoad"/>
URl link will be like this, in HTML mode rad-
<div id = "popupwindow">
<a href blah blah>
</div>
But I am getting an error :
An error occurred during the processing of . Type 'Telerik.SharePoint.FieldEditor.RadHtmlField' does not have a public property named 'OnClientLoad'.
Trial -3 :
In configfile.xml : I added <property name="OnClientLoad">OnClientLoad</property>
still I am getting error: -> does not have a public property named 'OnClientLoad'.
Any suggestions??? Is there any way i can implement these popup links with custom width n height inside rad editor?
I am using extensions\wpresources\RadEditorSharePoint\4.5.4.0__1f131a624888eeed .
In moss, I want implement popup new windows for Links inside rad editor, I want to mention custom width n height ( They may chage in next developemnt)
trial -1:
I tried to use window.open directly inside radwindow bt it didn't worked out, this piece of code striping by itself.
trial -2
I gone through yur foum and you are using OnclientLoad javascript method for window.open
So I tried to implement it. see below :
On page layout
<script type="text/javascript">
function OnClientLoad(editor)
{
editor.attachEventHandler ("onclick", function (e)
{
var sel = editor.getSelectedElement(); ; //get the currently selected element
var href = null;
var ele = document.getElementById("popupwindow");
if (ele)
{
if (sel.tagName == "A")
{
href = sel.href; //get the href value of the selected link
window.open(href, null, "height=500,width=500,status=no,toolbar=no,menubar=no,location=no");
return false;
}
}
});
}
</script>
For telerik:
<telerik:RadHtmlField id="pagecontent" FieldName="PublishingPageContent" runat="server" AllowSpecialTags="true" OnClientLoad="OnClientLoad"/>
URl link will be like this, in HTML mode rad-
<div id = "popupwindow">
<a href blah blah>
</div>
But I am getting an error :
An error occurred during the processing of . Type 'Telerik.SharePoint.FieldEditor.RadHtmlField' does not have a public property named 'OnClientLoad'.
Trial -3 :
In configfile.xml : I added <property name="OnClientLoad">OnClientLoad</property>
still I am getting error: -> does not have a public property named 'OnClientLoad'.
Any suggestions??? Is there any way i can implement these popup links with custom width n height inside rad editor?