Error: datepicker is not a function language "tr" - asp.net

I got the following error while using datepicker.js
TypeError: dp.datepicker is not a function
language: "tr"
I take the reference of this following link
Bootstrap Datepicker with Asp.Net Textbox
but it still gives the error.

<link rel="stylesheet" href="css/datepicker.css" type="text/css" />
<script src="Scripts/bootstrap-datepicker.js" type="text/javascript"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.js"></script>
do not load the same script twice

Related

$(...).datepicker is not a function- works on one server but not on another

I know this topic was opened here a lot, and I know that the problem for other users was that they included the Jquery.js file more than one time so there was a conflict between the files, however this isn't my case but I am still getting this error and couldn't find a solution that worked for me from previous Questions.
This is the code I am using on the .aspx file head section
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap-theme.min.css" rel="stylesheet" type="text/css" />
<link href = "css/jquery-ui.min.css"rel = "stylesheet"/>
<script type="text/javascript" src="Scripts/jquery-3.2.1.min.js"></script>
<script src = "js/jquery-ui.js" type="text/javascript"></script>
<script src="Scripts/UserPlans.js" type="text/javascript"></script>
I made sure that the jquery link comes before the jquery-ui
and in UserPlans.js file I have
$(document).ready(function () {
$("#calendar").click(function () {
$('#datepicker').datepicker({ defaultDate: new Date($("#formatedDate").val()) });
});
$('#datepicker').datepicker();
});
I get the following error :
Uncaught TypeError: $(...).datepicker is not a function
at HTMLDocument.<anonymous> (UserPlans.js?v=57153.032911662754:8)
at j (jquery-3.2.1.min.js:2)
at k (jquery-3.2.1.min.js:2)
However, I must point out that this code is in production in two different servers, in one of them it works without any problems, and in the other it gives this error I have just described. can it be related to the hosting machine somehow?

Removing "Loading Message"

I face a problem when i try to use jqm in my website. A message of 'loading' appears on the bottom of my site. I figured out that it happens since I don't add jqm css. When I add the jqm css everything changes (color layout ect.). How is it possible to remove 'loading' message or add css without conflicts with the main css of my site?
<head>
<link href="css/site.css" rel="stylesheet" />
<!--<link href="css/jquery.mobile-1.3.2.min.css" rel="stylesheet" /> -->
<!-- disable loading msg -->
<script>
$(document).bind("mobileinit", function(){
$.mobile.loadingMessage = false;
});
</script>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"> </script>
<script src="scripts/jquery.mobile-1.3.2.min.js"></script>
</head>
I add script in my code. Nothing seems to happen! My problem solved only when i uncomment jqm css code, but then i got many conflicts with the site.css which i dont know how to solve.
To disable jQuery Mobile loading message, you need to override global settings once mobileinit triggers. The code should be placed in head after loading jQuery and before loading jQuery Mobile libraries.
<head>
<script src="jquery.js"></script>
<script>
$(document).on("mobileinit", function () {
$.mobile.loadingMessage = false;
});
</script>
<script src="jquery-mobile.js"></script>
</head>

windows.kendo is undefiend on kendo.aspnetmvc.min.js

i get this error on kendo.aspnetmvc.min.js :
windows.kendo is undefiend .
my cod :
<script src="~/Scripts/jquery-1.7.1.min.js"></script>
<script src="~/Scripts/kendo/kendo.aspnetmvc.min.js"></script>
<script src="~/Scripts/kendo/kendo.web.min.js"></script>
<script src="~/Scripts/jquery-migrate-1.1.1.min.js"></script>
Try putting the include for kendo.web.min.js before the include for kendo.aspnetmvc.min.js. It needs to be there before the MVC stuff is included.

lightbox idtabs conflict

I have two javascripts that I think are in a conflict. idTabs, which helps me make the navigation and lightbox, which is the photo gallery. I also want to add that I have a 3rd page linked, a PHP SELECT from database page.
this is in my head
<title>Untitled Document</title>
<script type="text/javascript" src="jquery.idTabs.min.js"></script>
<script type="text/javascript" src="lightbox0/js/jquery.js"></script>
<script type="text/javascript" src="lightbox0/js/jquery.lightbox-0.5.js"></script>
> <link rel="stylesheet" type="text/css" href="lightbox0/css/jquery.lightbox-0.5.css" media="screen" />
<script type="text/javascript">
$(function() {
$('#gallery a').lightBox();
});
</script>
I dont understand what the light box doesn work. the id tabs works perfectly but when i click on a page, it doesn have the lightbox effect. i tried with at least 4-5 lightobx versions, the same effect. help ?
idTabs should be loaded after jQuery. Try the following:
<script src="lightbox0/js/jquery.js"></script>
<script src="lightbox0/js/jquery.lightbox-0.5.js"></script>
<script src="jquery.idTabs.min.js"></script>
Sanity Check: Do you have a <div id="gallery"> with links in it in the page?

JQuery Session problem

I am using jQuery session in my master page. Anything I'm missing?
Code:
<script type="text/javascript" language="javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.session("lnkID","A1")
});
</script>
Error:
Microsoft JScript runtime error: Object doesn't support this property or method
By your example alone, you're missing a reference to the required files, and you're not wrapping your jQuery code in script tags. You need to reference not only jquery-source, but jquery-json, and jquery-session as well.
<script type="text/javascript" src="scripts/jquery.js"></script>
<script type="text/javascript" src="scripts/jquery.json.js"></script>
<script type="text/javascript" src="scripts/jquery.session.js"></script>
Once you've got those in place, you need to place your logic within script tags:
<script type="text/javascript">
$(function(){
$.session("foo", "bar");
});
</script>
See the following demo for an example: http://www.jaysalvat.com/session/test1.html
Lastly, the language attribute of the script tag is deprecated. You can do away with it, but keep the type attribute.

Resources