Friday, June 29

VMware Fusion

Today, I got to play with a 17" MacBook Pro. I was supposed to try out VMware Fusion. I'd used it in its early beta days, but not since they added the very cool feature, Unity. This is about the same thing as Coherence in Parallels. (I haven't used Parallels since they added Coherence either).
Unity is a really nice feature. If you haven't heard of it, it allows you to use your Windows applications on the Mac desktop instead of having to be restricted to its guest window. These little app windows even work with Expose and other mac features. Here's some screenshots...


This is how a vm normally looks. Great, I'm trapped in a box.


But now! Awesome, my windows are sitting side by side. Plus, if you'll notice, there's even an icon in the dock for each of the Windows applications running.


The coolest thing (IMHO) is that you can still do expose and stuff with these windowed Windows apps.

And just because I can, here's a YouTube video someone made:

Wednesday, June 20

"Intelligent" Custom 404 Page

This is fairly simple, but took me quite a while to find. I wanted to use a custom 404 page on my WIMP, but I wanted to be able to do SSI, php and whatever. Well setting the 404 page is easy enough.

  1. Open IIS Manager

  2. Right-click on the website and go to properties

  3. go to the tab Custom Errors

  4. scroll down to 404 and click edit
Now this is the part I couldn't find any info on. If you pick File from Message type: you can only use htm/html files. If you pick an shtml file, the page will display, but no includes will work. If you pick a php (or asp) file, when you try to access a nonexistent page, the browser will download the 404 page!

To be able to use shtml/php, you have to pick URL and give it a link from site root (e.g. /404.php). Hit OK and Apply and it's all set.

Now you can set your 404 pages to anything you want. One helpful thing is to have it take whatever they typed in and use it as a search term for the site.

Thursday, June 14

No document.write() Allowed

I have not been doing a good job of posting in here, but honestly, I haven't been doing anything interesting at all. I guess the latest thing I learned was about document.write().

It is NOT ALLOWED in XHTML 1.1 Transitional. It creates code that will not be valid by the W3C. I was unaware when I started so I had a page that used it. I was using it for a section that randomly loaded a picture and some text each time the page loaded. doing like:

document.write('<img src="'+images[randomNumber]+'" />")

etc.
What I ended up doing to make it valid was use innerHTML. I did:
function feature(){
var place = document.getElementById('featured');
place.innerHTML = '<img src="'+images[randomNumber]+'" /><p>'+words[randomNumber]+'</p>';
}

and now it comes up valid. I'm pretty sure you can use addChild in a similar manner and it would be valid as well.