SharePoint 2013 Overlay Events to be Opened on Popup


 Yesterday we got a customer request that asked us to make all events on SharePoint calendar list to be opened on popup instead of open it on a new page

 We simply go to list setting and change dialog setting from list’s advanced settings. However this is doesn’t work for overlay events and continued to open it on a new tab Continue reading

Get a Localized String From SharePoint Application Resources


At the begging of any SharePoint I used to configure our project to deploy a resources files to APP_GlobalResources folder of our application virtual directory used by IIS.

You can’t simply do this using visual studio. You can do a lot of workarounds to make this work for you because visual studio don’t allow you to deploy resources files directly to APP_GlobalResources, it allows you only to deploy these files to application resources which found on 14 hive\Resources.

There is no problem where to deploy it but I have to add it to APP_GlobalResources to use it like the same way I use it in ASP.NET

Today I discover there is a smiple solution, I can use it directly from the 14 hive based on a SharePoint utility method called SPUtility.GetLocalizedString(), so I implement a method as following to do this:

public static string GetResource(string key, string resourceFileName)
return SPUtility.GetLocalizedString(“$Resources:”+key,resourceFileName,(uint)System.Threading.Thread.CurrentThread.CurrentUICulture.LCID);

Avoid “Show Unsecured Content” Message In HTTPS Sites


Hi All,

If you are developing a website which will be published in a secure socket layer (HTTPS) you may face some issues after publishing it for example a JavaScript may fall to run successfully and your web browser gives you a strange message tells you that this page contain unsecured content and give you the choice to view all content.

The problem here you added a reference to HTTP site in your page for example you use a JavaScript file which is hosted on an HTTP website

To avoid this problem you have to minimized depend on other websites as possible as you can

Drop Down Issue in Lookup Field


If the look-up field contains more than 20 items it convert to another structure instead of drop-down list. This happens only with IE browser

To get the drop-down back see the following article:

The solution:

I am assuming that you have a reference to the JQuery library in your master page.

$(document).ready(function () {

// Name of the column (Display Name)
var columnName = “Lookup”;

// Override the Drop Down List

// Main Function
function OverrideDropDownList(columnName) {

// Construct a drop down list object
var lookupDDL = new DropDownList(columnName);

// Do this only in complex mode…
if (lookupDDL.Type == “C”) {

// Hide the text box and drop down arrow
lookupDDL.Obj.css(‘display’, ‘none’);“img”).css(‘display’, ‘none’);

// Construct the simple drop down field with change trigger
var tempDDLName = “tempDDLName_” + columnName;
if (lookupDDL.Obj.parent().find(“select[ID='” + tempDDLName + “‘]”).length == 0) {

lookupDDL.Obj.parent().find(“select[ID='” + tempDDLName + “‘]”).bind(“change”, function () {
updateOriginalField(columnName, tempDDLName);

// Get all the options
var splittedChoices = lookupDDL.Obj.attr(‘choices’).split(“|”);

// get selected value
var hiddenVal = $(‘input[name=’ + lookupDDL.Obj.attr(“optHid”) + ‘]’).val()
if (hiddenVal == “0”) {
hiddenVal = lookupDDL.Obj.attr(“value”)

// Replacing the drop down object with the simple drop down list
lookupDDL = new DropDownList(tempDDLName);

// Populate the drop down list
for (var i = 0; i < splittedChoices.length; i++) {
var optionVal = splittedChoices[i];
var optionId = splittedChoices[i];

var selected = (optionId == hiddenVal) ? " selected='selected'" : "";
lookupDDL.Obj.append("” + optionVal + “”);

// method to update the original and hidden field.
function updateOriginalField(child, temp) {
var childSelect = new DropDownList(child);
var tempSelect = new DropDownList(temp);

// Set the text box
childSelect.Obj.attr(“value”, tempSelect.Obj.find(“option:selected”).val());

// Get Hidden ID
var hiddenId = childSelect.Obj.attr(“optHid”);

// Update the hidden variable
$(‘input[name=’ + hiddenId + ‘]’).val(tempSelect.Obj.find(“option:selected”).val());

// just to construct a drop down box object. Idea token from SPServces
function DropDownList(colName) {
// Simple – when they are less than 20 items
if ((this.Obj = $(“select[Title='” + colName + “‘]”)).html() != null) {
this.Type = “S”;
// Compound – when they are more than 20 items
} else if ((this.Obj = $(“input[Title='” + colName + “‘]”)).html() != null) {
this.Type = “C”;
// Multi-select: This will find the multi-select column control on English and most other languages sites where the Title looks like ‘Column Name possible values’
} else if ((this.Obj = $(“select[ID$=’SelectCandidate’][Title^='” + colName + ” ‘]”)).html() != null) {
this.Type = “M”;
// Multi-select: This will find the multi-select column control on a Russian site (and perhaps others) where the Title looks like ‘Выбранных значений: Column Name’
} else if ((this.Obj = $(“select[ID$=’SelectCandidate’][Title$=’: ” + colName + “‘]”)).html() != null) {
this.Type = “M”;
} else
this.Type = null;
} // End of function dropdownCtl