Hi
I am using Rad tool bar in my code and the javascript is in aspx page. I want to move that code to either Code behind or to other Javascript file. But when i tried copying code to code behind its giving error. The event is not firing..
This is how i am using the Code and I want to move the javascript to Code behind.
<rad:radtoolbar AutoPostBack="true" runat="server" id="tbStudentRequirement" skin="office2007" UseFadeEffect="True">
<items>
<rad:radtoolbarbutton Width="75px" ID="tbbtnEdit" AccessKey="i" Tooltip="Edit(Alt+I)" CommandName="Edit" ButtonImage="Edit.gif" ButtonText="Edit" Hidden="False" runat="server" DisplayType="textImage" />
</items>
</rad:radtoolbar>
Javascript in aspx page
<script language="javascript" type="text/javascript">
<%= tbDebtRequirement.ClientID %>.attachEvent("OnClientClick","ToolBarEvents");
function ToolBarEvents(sender, e)
{
if (sender.CommandName == "Edit")
{
if (!CheckComplexItemforEdit("Student"))
{
return false;
}
EditPopUp("ManageStudent.aspx?ID=" + document.getElementById("selectedID").value,"wndManageStudent");
return false;
}
}