Posts

Showing posts from August, 2003

.NET Weblogs @ ASP.NET

.NET Weblogs @ ASP.NET - good weblog site with many bloggers. Of interest is Datagrid Girl - using the datagrid in ASP.NET

Google Toolbar 2.0

Google Toolbar 2.0 is no longer beta: http://toolbar.google.com/ Features: Search the web with Google from any site New! Eliminate pop-up ads New! Fill in forms with one click New! Link a weblog to the page you're visiting New! Restrict your search to pages located in a specific country Search just within the pages of a site Highlight search terms on a page

VBScript - Set Homepage (MSIE) / Add Notepad to Send To

The following will set up your homepage (in Internet Explorer) via a VBScript file. Create a blank text file called 'sethome.vbs'. Running it will change your default home page. Useful for setting the home page via a login script (or after some spyware may have changed your homepage). Set WSHShell = WScript.CreateObject("WScript.Shell") ' home page URL StartPage = "http://www.google.co.uk" WSHShell.RegWrite "HKLM\Software\Microsoft\Internet Explorer\Main\Start Page", StartPage WSHShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page", StartPage This code will add notepad to the Send To menu (when you right click a file). Create a new file called 'sendtonotepad.vbs', containing the following code. Set WSHShell = WScript.CreateObject("WScript.Shell") Set oFSO = WScript.CreateObject("Scripting.FileSystemObject") sWinDir = oFSO.GetSpecialFolder(WindowsFolder) sSendTo = WSHShell.Special...

Overflow PRE tag (HTML & CSS)

Text doesn't wrap with the <pre> tag, so you need to scroll horizontally if there is a lot of text on one line: Nulla neque diam, accumsan nec, egestas non, facilisis sed, wisi. Donec lacinia vestibulum arcu. Suspendisse ligula. Donec tortor. Maecenas pharetra eros at odio. Morbi feugiat tempus orci. Cras vitae tellus. Sed congue nonummy magna. In sed neque id nisl tempus congue. Duis varius egestas tellus. Suspendisse potenti. Nunc rhoncus, eros eget malesuada rhoncus, mi purus pharetra eros, sit amet porta lectus tortor ac erat. In hac habitasse platea dictumst. However, if you wrap it as follows <pre style="overflow: auto; width: 100%">Text</pre> it adds scroll bars when needed: Nulla neque diam, accumsan nec, egestas non, facilisis sed, wisi. Donec lacinia vestibulum arcu. Suspendisse ligula. Donec tortor. Maecenas pharetra eros at odio. Morbi feugiat tempus orci. Cras vitae tellus. Sed congue nonummy magna. In sed neque id nisl tem...

File Functions (JScript):

Various JScript functions for manipulating files: They should all work whichever format you use for the folder (c:\webroot\folder\subfolder\ or /folder/subfolder/) Get files (returned as enumerator): /* sFolder = which folder (e.g. '/folder/subfolder/', 'c:\webroot\folder\subfolder\') return enumerator of files */ function getFiles(sFolder){ // create filesystemobject var oFSO = Server.CreateObject("Scripting.FileSystemObject") // get folder object try{ var oFolder = oFSO.getFolder((sFolder.indexOf("/")==-1)?sFolder:Server.MapPath(sFolder)) }catch(e){ // if error occurs return blank enumerator return new Enumerator() } // create enumerator for files var eFiles = new Enumerator(oFolder.Files) // return files list return eFiles } Get file name: /* sPTF = path to file, bExt = include extension, default yes returns filename as string */ function getFileName(sPTF,bExt){ // new method using filesystemobject if(bExt!=false) bExt = tr...