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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How to put Jquery plugins in Dotnetnuke module (*.ascx file?)How to put Jquery plugins in Dotnetnuke module (*.ascx file?)
Previous
 
Next
New Post
5/18/2011 12:02 PM
 
hi there,

I really want to use jquery plugins in my module.  I'm newbie in Jquery I try to use it.

How do you use JQuery  plugins? I mean I tried to put this definition in my *,ascx top under Page directive lines  <%@ Control  language ....?

<script type="text/javascript" src="../../Script/jquery.calculator.min.js" ></script>

<script type="text/javascript">
   $(function() {
      $('#basicCalculator').calculator({
      showOn: 'both', buttonImageOnly: true, buttonImage: 'calculator.png'
    } );
  });
</script>

<p><input type="text" id="basicCalculator"></p>


jquery.calculator.min.js is in the folder named Script in the module.  ( and this folder is in root of the module  like Components folder, Documentation folder and script folder)

how do you use the Jquery plugins? I mean I get an error.

error:  "Object doesn't support this property or metho    - Default.aspx    line 265  - code: 0

I'm using the hosted jquery URL in advanced settings.  Jquery is working but I need to get work with plugins.

 
New Post
5/22/2011 3:03 PM
 
Mesut

You should register your javascript in the code like this:


if
(!Page.IsClientScriptBlockRegistered("jQuery"))
{
Page.RegisterClientScriptBlock(
"jQuery",
 string.Format("<script type=\"text/javascript\" src=\"{0}\"></script>",
 this.ResolveUrl("/js/jquery.min.js")));
}


The same way for other scripts too.

Hope this helps!

Sergey
 
New Post
5/23/2011 11:25 AM
 
Add jQuery link in Host->Host Settings-> jQuery Settings -> Hosted jQuery URL
And try to do something like this:
            if (!IsPostBack)
                DotNetNuke.Framework.jQuery.RequestRegistration();

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How to put Jquery plugins in Dotnetnuke module (*.ascx file?)How to put Jquery plugins in Dotnetnuke module (*.ascx file?)


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