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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUsing jQuery Datepicker in custom DNN moduleUsing jQuery Datepicker in custom DNN module
Previous
 
Next
New Post
11/4/2010 4:48 AM
 
Hi everyone

I have problem, with jquery datepicker in my custom DNN module.

I didn't find any right answer, how to include jqeury date picker UI, that will work with my module.

I have downloaded all necessary files.
In my View.ascx file i have include:

<link href="css/ui-lightness/jquery-ui-1.8.6.custom.css" rel="stylesheet" type="text/css" />
<script src="jquery-1.4.3.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.8.6.custom.min.js" type="text/javascript"></script>

then i write function:
<script type="text/javascript">
(function($)
{
    $("#datepicker").datepicker();
 })(jQuery);
</script>

datepicker was my test text input.
In View.cs file a have include:
DotNetNuke.Framework.jQuery.RequestRegistration();
on page load.

I hope that i will get any answer.

Thanks

Matic
 
New Post
11/4/2010 4:59 AM
 
Matic

In case you have already added 

<script src="jquery-1.4.3.min.js" type="text/javascript"></script>

why do you call 

DotNetNuke.Framework.jQuery.RequestRegistration();

Also please check this script js/jquery-ui-1.8.6.custom.min.js is located in the correct path and has been loaded successfully. Can you look at JavaScript errors you have in FireFox or Chrome? 

Sergey
 
New Post
11/4/2010 5:13 AM
 
Ok I deleted include in ascx file
<script src="jquery-1.4.3.min.js" type="text/javascript"></script>.

Path is right, the problem is the same even if i change path of the file

Error is every where: This is Copy from IE


Object doesn't support this property of method

Line 201

Line 201 is line where a call datepicker method

Thanks
Matic


Message: Object doesn't support this property or method
Line: 201
Char: 5
Code: 0
URI: http://localhost/dnn531/Rezervacijskisistem.aspx

 
New Post
11/4/2010 5:18 AM
 
matic

It still looks like your second library has not been loaded. Please check log of JavaScript in FireFox, it has more details and more correct then IE. May be you use relevant path to the second library? Can you tell me where second library located is? Is it in DesktopModules/YourModule/js/? or another path?

May be you need to use ResolveURL the method to point to correct path?

Sergey
 
New Post
11/4/2010 5:29 AM
 
Error in Firefox is this:
jQuery is not defined

But if I create custom html file and include js files in the same way like here. Everything work..
Sl the problems i think it is not because of the path..
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUsing jQuery Datepicker in custom DNN moduleUsing jQuery Datepicker in custom DNN module


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