This project is read-only.
The jQuery Script Manager control has been designed to make using jQuery with ASP.Net simple and be a way to simply organise JavaScript.

The current way to use the jQuery Script Manager is fairly straight forward.

1) add the jQuery Script Manager to the page

//Add control
<%@ Register Assembly="jQuery.ScriptManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Namespace="jQuery.ScriptManager" TagPrefix="jQuery" %>

...

<jQuery:jQueryManager id="jQueryM" runat="server">
</jQueryManager>


2) register any JavaScripts functions that need to run on document.load

//Add the name of the JavaScript function
<jQuery:jQueryManager id="jQueryM" runat="server">
     <ReadyFunctions>
          <jQuery:RegisterReadyFunction FunctionName="TestFunction" />
     </ReadyFunctions>
</jQueryManager>


//JavaScript code either in the page head or an external .js file (The correct way to do it!)
function TestFunction(){
     alert('The page has loaded!');
}


The JavaScript function "TestFunction" will be called when the page loads by placing it in jQuery's $(document).ready function.

Last edited May 29, 2007 at 11:19 AM by prodactor, version 2

Comments

No comments yet.