Code: Custom IIF for VBscript

I add a custom IIF function to every VBscript I make:

' IIF recreated for VBscript
FUNCTION IIF(Expression, Truepart, Falsepart)
	IF Expression THEN 
		IIF = Truepart
		IIF = Falsepart

'used like so:
strFlavor = IIF(strColor="brown", "chocolate", "not chocolate")


Mind you, it evaluates all parameters on the way in, so even though this checks the objTest object when assigning using it, it would still fail (when the objTest object reference is not set):

strFlavor = IIF(IsObject(objTest), objTest.flavor, "vanilla")


It’s no ternary operator, but it’s still indispensible for efficient VBScript coding.

Dev tip: CSS-only workaround for IE SELECT Z-index bug

Via Dean Edwards’ Links, meet
HedgerWow’s <SELECT>-Free Layer, a CSS-only workaround for Internet Explorer’s SELECT bug with z-index.

It’s not quite clear from the demo, but I think the magic is an absolutely-positioned + transparent + huge IFRAME inside the layer to show.  C’est trĂ©s hacky, but it still seems better (in a way) than the usual dynamic hide/show javascript approach.

Here’s hoping that Microsoft will quickly windows-update us all with IE7 (which fixes this bug, hoorah), and free us of these sHACKles.

IE6 HTTP Bug with HTTP_Accept request header

Something I bumped into today: The first time Internet Explorer loads a URL, it sends an “HTTP_Accept” request header with the list of MIME types it accepts, like so:
HTTP_ACCEPT = application/, application/, application/msword, */*

Any subsequent request of the same URL, though, only sends “*/*”:

Of course I watched this through an ASP page which wrote out Request.ServerVariables("HTTP_Accept").  I wasn’t sure if it was IIS or IE‘s fault tho, so I checked the raw headers with Fiddler, and it’s definitely IE.

What’s especially strange is that I can find little or no mention of the problem. Anyone else heard of (or conquered) this?

It rather messes up a page I’m working on…

UPDATE: See here for a bug and workaround demo article I just put together.

Dev Tip: Rounded Corner Generator

Got a question today from my friend George about the best way to make rounded corners.  I listed some choices, with pros/cons of each:

I ended up recommending static images as the best combination of performance and compatibility, at the expense of developer time.  Then it occurred to me: surely I’m not the only lazy one — someone must’ve already made a web-based wizard to quickly create sets of corner images for download and installation.  Could it be??

Google says Voila!  Jalenack’s Complete Rounded Corners Creator

I say Sweet!  I tell ya, kids these days got it easy!

Discovered: MS-DOS 7.10, hrm?!

Apparently someone ripped out the underlying DOS from Windows 98 and made it work as a standalone OS.  (Unfortunately, the main site is down, but there’s a good info & a download mirror here.)

Why, you ask? So you can keep using old hardware, but with better disk support, FAT32, drivers, etc.

Fun stuff.  I’ve already installed it.  I’m looking forward to silliness like running the Windows 3.1 shell on top of it!

Main info site (seems to be down): MS-DOS 7.10 Download

Main info site (google cache): MS-DOS 7.10 Download

Download Mirror: Forums – Old Operating System Links

2005-10-01 – IPBOOTB errors


My SBS 2003 box was getting this error several times a day:
“IPBOOTP was unable to receive an incoming message on the local interface with IP address x.x.x.x . The data is the error code.”


Most applicable suggestions I found said to either disable the DHCP Relay Agent service, or install a Win2000 hotfix.  No luck for me, though, since the service wasn’t installed, and I’m on SBS 2003.


Microsoft.Public Usenet – IPBOOTP ERROR PLEASE HELP.  Hurrah, disabling DHCP Relay on the LAN interface in RRAS manager.