Sharing the experience search

Search sharing-the-experience.blogspot.com
Showing posts with label API. Show all posts
Showing posts with label API. Show all posts

Tuesday, January 25, 2011

javascript: how to make Input non editable

Do you want dynamically set the input non-editable?
Here we go:

var setNonEditable=true;
var input =document.getElementById("InputId");
//#1 In this case - the value won't be save in the input field event it presents there
if(setNonEditable)
 {
    input .style.visibility = 'hidden';
 }
else
 {
   input .style.visibility = 'visible';
  }
//#2 The value will be saved even the input is not editable but value is in there
if(setNonEditable)
 {
   input .disabled = true;
 }
else
 {
     input .disabled = false;
  }

Happy easy coding!

Tuesday, December 7, 2010

Your SharePoint is leaking!

A great article with a bunch of useful examples - SharePoint 2007 and WSS 3.0 Dispose Patterns by Example
Not only openWeb and New SPSite will leak your SharePoint out!
This is really insightful! - Not every message "Potentially excessive number of SPRequest objects" is abnormal - Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007