Hi,
How we can change the cssClass for an element WebTextEditor while change some radio button selction
here is the code
<igtxt:WebTextEditor runAt="server" cssClass="AminReadOnly" ID="txtBuyerAccount" ReadOnly="true" Width="150px"> </igtxt:WebTextEditor>
On some radio button click blow function is being called...
function OnRadioButton_Click(ID){ var bAccount=document.getElementById('<%=txtBuyerAccount.ClientID%>'); bAccount.get_element().className="AdminTextBox";
}
but its not working and chaning the webtexteditor class name changing at run time.
Hello Muhammad,
After investigating this further, I determined that your requirement could be achieved by using the jQuery method “addClass”. The instance of the editor is wrapped as a jQuery element, in order to use the “addClass” method:
function radioButton()
{
var editor = $find('<%=WebTextEditor1.ClientID%>');
$(editor.get_element()).addClass("AdminTextBox");
Below I am attaching a sample, demonstrating the described behavior. Please let me know if you need any further information regarding this matter.
Regards,
Monika Kirkova,
Infragistics
WebTextEditorCssClass.zip
Hi Monika,
thanks for your response.
I just noticed that the below code
is written under <header runat="server"> block. why is it so? just to understand it. thanks.
Muhammad Hassan