Reputation: 17388
I am trying to follow this. This produces in my case this HTML:
<!DOCTYPE HTML>
<HTML xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:rdXslExtension="urn:rdXslExtension">
<HEAD>
<TITLE>LogiPoc</TITLE>
<LINK rel="stylesheet" type="text/css" href="rdTemplate/rdTheme/ProfessionalBlue/Theme.css" />
<LINK rel="stylesheet" type="text/css" href="rdTemplate/rdRoundCorners.css" />
<LINK rel="stylesheet" type="text/css" href="_SupportFiles/jqueryUI.css" />
<SCRIPT src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></SCRIPT><SCRIPT src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></SCRIPT><SCRIPT src="_SupportFiles/Test.js"></SCRIPT>
<META name="lgxver" content="11.4.46.313" />
<META http-equiv="X-UA-Compatible" content="IE=edge" />
<SCRIPT LANGUAGE="JavaScript" src="rdTemplate/rdYui/global.js"></SCRIPT><SCRIPT LANGUAGE="JAVASCRIPT" src="rdTemplate/rdYui/yui-preload-min.js"></SCRIPT><SCRIPT TYPE="text/javascript">function rdBodyLoad() {document.body.appendChild(YUI.Env.cssStampEl);
}
</SCRIPT><SCRIPT TYPE="text/javascript">function rdValidateForm() {}</SCRIPT>
</HEAD>
<BODY onload="rdBodyLoad()">
<FORM NAME="rdForm" method="POST">
<SPAN id="rdReportHeader"></SPAN><SPAN id="rdReportHeader-end"></SPAN>
<div id="rdMainBodyStart"></div>
<div id="rdMainBody">
<BR />
<DIV id="divDatePicker"></DIV>
<SPAN id="div1"></SPAN>
</div>
<div id="rdMainBodyEnd"></div>
<SPAN id="rdReportFooter"></SPAN><SPAN id="rdReportFooter-end"></SPAN>
<rdHidden></rdHidden>
</FORM>
</BODY>
</HTML>
The Test.js contains:
$(document).ready(function() {
$("#divDatePicker").datepicker();
});
Unfortunately, this does not work. I presume the reason is that the div with id divDatePicker is nested. Is this correct? Could you please suggest a solution?
Upvotes: 0
Views: 72
Reputation: 337570
You need to include jquery.js
in your page before jqueryui.js
:
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<script src="_SupportFiles/Test.js"></script>
<!-- other scripts... -->
</head>
Upvotes: 1