A property in my user control is setting the width of a panel to a hidden field, and then using javascrip the hidden field is setting the width of the panel. Here is the code for the latter part:
Error is: "Too many characters in character literal"
I believe the error is with: OnLoad="javascript: SetWidth('<%=Paneltest.ClientID%>')", but I can't figure out the correct syntax.
Thanks for the help.
Code:
<asp:Panel id="Paneltest" runat="server" OnLoad="javascript: SetWidth('<%=Paneltest.ClientID%>')"></asp:Panel>
function SetWidth(panelID)
{
var panel = $get(panelID);
panel.style.width = document.getElementById("hfModalWidth").Value;
}
Error is: "Too many characters in character literal"
I believe the error is with: OnLoad="javascript: SetWidth('<%=Paneltest.ClientID%>')", but I can't figure out the correct syntax.
Thanks for the help.