Take the 2-minute tour ×  When you are coding in an aspx page
you can do something like this:      <script
type="text/javascript">       $(document).ready(function () {
var chkEnable = $get("<%= chkEnable.ClientID %>");     <form
runat="server">       <asp:CheckBox ID="chkEnable"
runat="server" />  But the only way I have found to use
javascript in a web part is to use a ScriptLink that imports the
file. Example:  <SharePoint:ScriptLink ID="ScriptLink5"
runat="server" Name="myPorject/js/myCustomScript.js"
Localizable="false" LoadAfterUI="true"/>  Is there any way that
I could reproduce the functionality from my first example in a
web part? Anything that I do must be able to be installed
entirely through a wsp onto a system that I have no other access
to. Any solution must be implemented entirely through the wsp.
share|improve this question by wsp do you mean sandbox or farm
solutions? –  djeeg Apr 18 '11 at 5:17 sorry, farm solutions. – 
Abe Miessler Apr 18 '11 at 15:07 add comment  2 Answers  up vot