Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...how do i go about the Jquery in DotnetNukehow do i go about the Jquery in DotnetNuke
Previous
 
Next
New Post
8/8/2008 6:22 AM
 

Can any one tell me how i should go about the JQuery in DotNetNuke??


Sandeep Sachan

Software Development

 
New Post
8/8/2008 12:10 PM
 

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,


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
8/8/2008 1:41 PM
 

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.

 
New Post
10/14/2008 3:42 PM
 

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,

 
New Post
10/14/2008 4:54 PM
 

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,


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...how do i go about the Jquery in DotnetNukehow do i go about the Jquery in DotnetNuke


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out