Thursday, 13 March 2014

HTTP 403 FORBIDDEN in SharePoint

HTTP 403 FORBIDDEN in SharePoint

Solution:


There would be many reasons to get that error.
First solution is: Check IIS ..Apppool is running or not. And do IISRESET
Check Password is correct or expired?
Finally run: re-run SharePoint 2010 Products Configuration Wizard

CAML Designer for SharePoint

CAML Designer for SharePoint
http://biwug-web.sharepoint.com/SitePages/Caml_designer.aspx

Wednesday, 12 March 2014

Javascript Session

Javascript Session

You want to send data from one page to another page using javascript.

Then try this

In any page, create Array:

var yourArray = [ 1, 2, 3 ];

Store array in to localStorage
// Store it
localStorage['foo'] = JSON.stringify( yourArray );
Now go to any other page.
use below code
// And retrieve it
var storedArray = JSON.parse( localStorage['foo'] );

now
var a=storedArray[0];

var b=storedArray[1];
var c=storedArray[2];


Add CSS JavaScript to custom Publishing Page layout

Add CSS  JavaScript to custom Publishing Page layout
Open Page layout from SharePoint Designer
You can add under "PlaceHolderAdditionalPageHead" or "PlaceHolderMain".
<asp:Content ContentPlaceholderID="PlaceHolderAdditionalPageHead" runat="server">
<style type="text/css">
//some css
</style>
<script type="text/javascript">
//some js
</script>
</asp:Content>
----------------------
<asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">
<style type="text/css">
//some css
</style>
<script type="text/javascript">
//some js
</script>
</asp:Content>

SP.Taxonomy.TaxonomySession.getTaxonomySession

SP.Taxonomy.TaxonomySession.getTaxonomySession 
<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js"></script><script type="text/javascript" src="_layouts/15/sp.runtime.js"></script>
<script type="text/javascript" src="_layouts/15/sp.js"></script><script type="text/javascript" src="_layouts/15/SP.Taxonomy.js"></script>
<script type="text/javascript">// <![CDATA[
var context = new SP.ClientContext.get_current();
SP.SOD.executeFunc("sp.js", 'SP.ClientContext', function () {
AllTerms()
});
var term;
var terms;
var termGUIDs = new Array();
var termIDs = new Array();
function AllTerms() {
termGUIDs = new Array();
termIDs = new Array();
//Current Taxonomy Session
var taxonomySession = SP.Taxonomy.TaxonomySession.getTaxonomySession(context);
//Term Stores
var termStores = taxonomySession.get_termStores();
//Name of the Term Store from which to get the Terms.
var termStore = termStores.getByName("Taxonomy_AR432SAsZfzLjMeFcL4tw==");
//GUID of Term Set from which to get the Terms.
var termGroup = termStore.getGroup(GUID);
var termSet = termGroup.get_termSets().getByName("Child");
terms = termSet.getAllTerms();
context.load(terms);
context.executeQueryAsync(
Function.createDelegate(this, getTermsComplete),
function (sender, args) { alert("Get Terms: " + args.get_message()); }
);
}
function getTermsComplete() {
var html = "
<ul>";
var termEnumerator = terms.getEnumerator();
//var termPath = term.get_pathOfTerm();
while (termEnumerator.moveNext()) {
var currentTerm = termEnumerator.get_current();
var currentTermPath = currentTerm.get_pathOfTerm();
var currentGuid = currentTerm.get_id().toString();
html += "
<li>" + currentTerm.get_name() + " [" + currentTerm.get_pathOfTerm() + "]</li>
";
html += "
<li>" + currentTerm.get_id().toString() + "</li>
";
}
html += "</ul>
";
//Output interim details of what terms are this node or subnodes
var div = document.getElementById('outputDiv').innerHTML = html;
}
// ]]></script>
<label id="outputDiv"></label>

Enable and disable checbox using jQuery

Enable and disable checbox using jQuery
$('button').click(function(){
var i = $('input');
if ( i.is('[disabled]') )
i.attr('disabled',false)
else
i.attr('disabled',true);
})

The proxy server isn’t responding

The proxy server isn’t responding
a) Under "Tools" in the browser tool bar select "Internet Options".
b) In the "Internet Options" Window that pops up, click the "Connections" tab at the top.
c) Click "LAN Settings" near the bottom of the "Connections" section.
d) If the "Proxy server" checkbox is marked with a check, click it to deselect/uncheck it.
e) Click "Ok" to close the "Local Area Network (LAN) Settings" window.
f) Click "Ok" to close the "Internet Options" Window.
Now check if you are able to connect to Internet Explorer.