| |
|
|
|
|
|
|
|
|
|
 |    |  |
 | |  |
 | |  |
 | |  |
 | |  |
 |
|
|
| how do i go about the Jquery in DotnetNuke |
|
|
Can any one tell me how i should go about the JQuery in DotNetNuke?? Sandeep Sachan
|
|
|
|
 |  |
|
|
| Re: how do i go about the Jquery in DotnetNuke |
|
|
We are using the following code to 1) reference the jQuery library, 2) reference our script file (which is compiled into the assembly as an embedded resource) and 3) call jQuery.noConflict once the page has loaded, to remove any issues between the ClientAPI and jQuery definitions of $.
1: Page.ClientScript.RegisterClientScriptInclude(GetType(ModuleBase), "jquery 1.2.6", "http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js")
2: Page.ClientScript.RegisterClientScriptResource(GetType(ModuleBase), "Engage.Dnn.ModuleName.JavaScript.ScriptName.js")
3: Page.ClientScript.RegisterStartupScript(GetType(ModuleBase), "jQueryNoConflict", "jQuery(document).ready(function(){jQuery.noConflict();});", true)
Hope it helps,

The leading provider of DotNetNuke support, training and custom module development. |
|
|
|
 |  |
|
|
| Re: how do i go about the Jquery in DotnetNuke |
|
|
For those that might be less technically inclined there is also a module on snowcovered.com called Script Injector. It seems to be fairly full featured with many options on script location within a page. |
|
|
|
 |  |
|
|
| Re: how do i go about the Jquery in DotnetNuke |
|
|
can you go into more detail about step 2?
basically i'm stuck with i have a page where i want to do a jquery call that will call a dnn module that i made to refresh the data dynamically and i don't know how to call that module without creating a page, but then that page has a bunch of extra DNN stuff returned with the html of the ajax call.
thanks.
Brian Dukes wrote
We are using the following code to 1) reference the jQuery library, 2) reference our script file (which is compiled into the assembly as an embedded resource) and 3) call jQuery.noConflict once the page has loaded, to remove any issues between the ClientAPI and jQuery definitions of $.
1: Page.ClientScript.RegisterClientScriptInclude(GetType(ModuleBase), "jquery 1.2.6", "http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js")
2: Page.ClientScript.RegisterClientScriptResource(GetType(ModuleBase), "Engage.Dnn.ModuleName.JavaScript.ScriptName.js")
3: Page.ClientScript.RegisterStartupScript(GetType(ModuleBase), "jQueryNoConflict", "jQuery(document).ready(function(){jQuery.noConflict();});", true)
Hope it helps,
|
|
|
|
|
 |  |
|
|
| Re: how do i go about the Jquery in DotnetNuke |
|
|
For step 2, you have a JavaScript file with functions specific to your module. Add that to your project in Visual Studio, then view the properties for that file (right click it in the solution explorer and pick Properties). Change the Build Action item to Embedded Resource. Note that the name used above is for a file name ScriptName.js in a folder named JavaScript, for a module with a default namespace of Engage.Dnn.ModuleName. You will also need to register it as a WebResource in order to access it from a web address, so add [assembly: WebResource("Engage.Dnn.ModuleName.JavaScript.ScriptName.js", "text/javascript")].
For what you want to do, I would suggest adding a blank .aspx page to your module, and call that, rather than trying to use a DNN page.
Hope that helps,

The leading provider of DotNetNuke support, training and custom module development. |
|
|
|
|  |
 | |  |
 | |  |
 | |  |
|  |
| |
 |
|
These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.
For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:
1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.
|
| |
 |
|
|
|
|
|
|
|