Sunday, August 10, 2014

Caml Query Operators Sharepoint 2013

Operators
Some list of operators used in SPQuery

  1. Eq--Equals
  2. Neq--Not equal
  3. Gt--Greater than
  4. Geq--Greater than or equal
  5. Lt--Lower than
  6. Leq--Lower than
  7. IsNull--Is null
  8. BeginsWith--Begins with
  9. Contains--Contains

Thursday, August 7, 2014

return in javascript function

<!DOCTYPE html>
<html>
<body>



<p id="demo"></p>

<script>
function myFunction(a, b) {
    return a * b;
}
document.getElementById("demo").innerHTML = myFunction(4, 3);
</script>

</body>
</html>
This example calls a function which performs a calculation, and returns the result:12

Wednesday, August 6, 2014

Jquery DatePicker example 2

<html lang="en">
<head>
<style >
div.ui-datepicker{
 font-size:11px;
}
</style>
  <title>jQuery UI Datepicker - Default functionality</title>
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
  <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
  <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>

  <script>

  $(function() {
    $( "#fromdatepicker" ).datepicker();
    $( "#todatepicker" ).datepicker();
  });
$(function() {
$("#btnFilter").click(function() {
 var startDate = $("#fromdatepicker").datepicker("getDate");
 startDate  =  startDate.getFullYear()+"-"+(startDate.getMonth()+1)+"-"+startDate.getDate();

 var endDate = $("#todatepicker").datepicker("getDate");
 endDate  =  endDate.getFullYear()+"-"+(endDate.getMonth()+1)+"-"+endDate.getDate();

 alert(startDate +"-"+ endDate);
});
});
  </script>
</head>
<body>

<p>
From Date: <input type="text" id="fromdatepicker" style="font-size:11px"  />
To Date: <input type="text" id="todatepicker" style="font-size:11px"  /> &nbsp;&nbsp;&nbsp;
<input type="button" id="btnFilter" value="Generate Report">
</p>


</body>
</html>
jQuery UI Datepicker - Default functionality From Date: To Date:    

Datepicker example Jquery

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Datepicker - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script>
$(function() {
$( "#datepicker" ).datepicker();
});
</script>
</head>
<body>
<p>Date: <input type="text" id="datepicker"></p>
</body>
</html>
jQuery UI Datepicker - Default functionality Date:

add elements to array in javascript

<!DOCTYPE html>
<html>
<body>

<p>Click the button to add a new element to the array.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
var fruits = [];
document.getElementById("demo").innerHTML = fruits;

function myFunction() {
    fruits.push("Kiwi","Shekhar");
    document.getElementById("demo").innerHTML = fruits;
}
</script>

</body>
</html>
Click the button to add a new element to the array.

Use variables in one javascript file to other javascript file

1) // first.js
var colorCodes = {

  back  : "#fff",
  front : "#888",
  side  : "#369"

};

2) // second.js
alert (colorCodes.back); // alerts `#fff`
3) Your HTML
<script type="text/javascript" src="first.js"></script> 
<script type="text/javascript" src="second.js"></script> 

Tuesday, August 5, 2014

The provided app differs from another app with the same version and product id sharepoint 2013 (Sample 2)

1) Click On Tools

 
2) Click on Create Guid

3) Click on Copy Button

4) Go To AppManifest.xml and Replace Product Id with New and See if it is working