Friday, November 21, 2008
How to replace a broken default.master in SharePoint 3.0
If you mess up your default.master in SharePoint 3.0, you may get a "File not found" error on every page. To restore operation, use Windows explorer to go to the folder \\SharePointSite\DavWWWRoot\_catalogs\masterpage and copy a valid default.master file there.
Thursday, November 20, 2008
Displaying record ID in Sharepoint 2003
Put the following javascript in the Dispform.aspx and Editform.aspx:
function urlparm( name ){ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\< /a>]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == null ) return ""; else return results[1];}
onetidPageTitle.innerHTML=' <h2 class="ms-pagetitle">ID: '+urlparm("ID")+'</h2>';
Get whois on an IP address in a web page
create a bookmark. Enter the following URL:
javascript:{var s = document.selection; var r = s.createRange(); var t= r.text; var w=window.open("http://whois.domaintools.com/"+t);}
Select an IP address on a web page. Click on the bookmark.
Tuesday, November 18, 2008
Set program output to environment variable in batch file
FOR /F "tokens=*" %A IN ('prog.exe') DO SET ENVVAR=%A
Sunday, November 9, 2008
How to stop a META REFRESH
Use Firefox 3. Go to Tools, Options, Advanced, General and check the box for "Warn me when websites try to redirect or reload the page".
Subscribe to:
Posts (Atom)