Friday, 8 March 2013

Using Jquery with Cognos

Hi Guys ,

Please go through other article before this it will giv you some basics

Jquery with Cognos

As you are aware cognos has limited functionalities and to improve them we use javascript .However most report authors are not javascript developers so we have a issue .You can make use of jquery to make your life simpler .

We have jquery-UI library which allows you to make your of lot of features like .Sliders , Data prompts and all those flashy things you see on most of website .If your userbase wants that kind of experience with cognos


http://www.htmlgoodies.com/tutorials/forms/article.php/3895776/HTML-Forms-jQuery-Basics---Getting-Started.htm

Below is the javascript for Default date prompt value selection 


<script>
pickerControlPDate.setValue(sysdate )-------- instead of sysdate you can have a function here and write your logic

</script>
-----------------------------------------------------------------------------------------

Below is a script for jquery-UI date picker.Copy it in a notepad and save the notepad as abc.html
it should work



<html lang="en">
<head>
  <meta charset="utf-8" />
  <script type="text/javascript"
 src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript"
 src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"></script>
  <script>
  $(function() {
    $( "#datepicker" ).datepicker();
  });
  </script>
</head>
<body>

<p>Date: <input type="text" id="datepicker" /></p>


</body>
</html>


2 comments: