SitePoint Tech Times September 15th, 2004 
Issue 97 

Newsletter Archives | Advertising | Contact us  
Tips, Tricks, News and Reviews for Web Coders

In This Issue...

Build Your Own ASP.NET Website Using C# & VB.NET

Learn to build dynamic ASP.NET Websites using freely available software with no programming experience. Learn ASP.NET by building:

Build Your Own ASP.NET Website Using C# & VB.NET
  • a password-protected Intranet
  • an ecommerce store
  • a shopping cart system with credit card processing
  • a newsletter system
  • and much more!

All the content is presented in a fun, practical and easy-to-understand style. All you need to get started is a recent version of Windows and knowledge of HTML! (More information...)


click here if the button doesn't work

Top


Introduction

Kevin Yank Thanks to some hasty hardware handling by yours truly, I had smoke come out of my computer last weekend! Can you guess which part did the smoking?

Computer parts are pretty well designed these days, so as you might expect the part that I was able to plug in wrong to cause a short circuit was the antiquated floppy drive.

Melted floppy cable

As incendiary incidents go, I was happy to get away with a new floppy drive and a little electrical tape. Bullet dodged, I say, as at the other end of the short circuit was one of my hard drives.

SitePoint's Around the World photo competition is winding down with less than a week to get in for your chance to nab an iPod. With all the fantastic entries so far, we're still lacking some major landmarks like the Eiffel Tower, the Grand Canyon, the Sydney Opera House, and the Olympic village. Live close to a famous landmark? You might be surprised just how easy it is to win in this contest... <hint, hint...>

Top


PNG Panic

All this week I've been brewing up a big rant for you about Internet Explorer's PNG support sliding further downhill in Windows XP Service Pack 2. Turns out things weren't nearly as bad as I feared. Now I'm just confused...

Way back in the Tech Times #44, I explained a somewhat clunky workaround that let you display a partially transparent PNG image in both Internet Explorer and other browsers. I ended that particular tip with these naively hopeful words:

Let's just hope that Microsoft wise up and support PNG transparency with the standard <img> tag in Internet Explorer 7!

Now, more than two years later, not much has changed.

Over the weekend, I was working for the first time since installing SP2 on a site I designed recently that uses PNG transparency in the main logo at the top of every page. When I previewed my work in Internet Explorer, I was shocked to see it display a warning about active content as it refused to display the logo!

The cause? Well, though you may not realize it, you need to use an ActiveX control to display PNG transparency in Internet Explorer.

filter:progid:DXImageTransform.Microsoft.
    AlphaImageLoader(src='logo.png');

In this IE-only CSS property, which displays a PNG file with transparency in that browser, DXImageTransform.Microsoft.AlphaImageLoader is actually an ActiveX control. And at first glance, it looked to me like Internet Explorer had decided to block its use by default. Disaster!

Today I got around to visiting the live version of the site in Internet Explorer, and I was both relieved and suspicious when the security warning didn't pop up. Had it all been some bizarre nightmare?

It turns out that, by default, Internet Explorer only blocks the PNG transparency control when loading a page from your computer (i.e. with a file:// URL). Near as I can figure, someone decided that allowing ActiveX controls to access local files was a security risk. Personally, I'd have liked to have seen an exception made for this particular control.

For semi-official information and discussion about PNG support in Internet Explorer, see the Channel9 Wiki.

Top


HTML Utopia - Learn CSS the Easy Way!

HTML Utopia: Designing Without Tables Using CSS is a complete introductory guide to CSS with a particular focus on using CSS for layout.

HTML Utopia: Designing Without Tables Using
CSS
On top of the guide, the book includes the most complete CSS property reference currently available! With coverage of over 150+ properties (CSS1, CSS2, and browser-specific extensions), the reference provides descriptions, examples, and browser compatibility information.

Brandon Eley of CDHost says:

I have several books on CSS but never got past just putting up a stylesheet for text formatting and creating all my layouts in HTML tables, until now. I sat down yesterday morning and opened the book for the first time. By the end of the day, I had redesigned my entire site layout with a centered two-column design, completely using CSS.


click here if the button doesn't work

Top


Crossing the Great Divide

At the risk of scaring off some of the less advanced readers, I'm continuing to follow Harry Fuecks' efforts to develop ScriptServer, a framework that allows JavaScript code in the browser to execute PHP code on the server.

SitePoint's PHP blog has had suspiciously little PHP and a whole lot of JavaScript in it lately. With the latest installment in his Crouching JavaScript, Hidden PHP saga, Harry revealed the method to this madness.

Throughout Web history, there has been a Great Divide between server-side code and client-side code:

  • On the server side, code such as PHP scripts are used the process form submissions and generate Web pages dynamically from databases and other sources.
  • On the client side, JavaScript code (and occasionally Flash movies and Java applets) display friendly, usable interfaces to the user.

Until recently, the only pass over this Great Divide that would allow client-side interface code to use server-side processing code has been the browser's page request mechanism. That is to say, the client-side code can do all the lovely interface stuff it likes, but the moment it needs to get information from the server, a new Web page must be loaded to obtain that information.

Last issue, I explored some recent developments in browser technology that have begun to suggest alternative routes across the Great Divide. It is fast becoming practical for JavaScript code to interact with the server between page requests. Similar trends can be seen in the world of Flash (e.g. Flash Remoting).

Harry's ScriptServer project aims to pave a nice, smooth four-lane highway right over the Great Divide. Rather than forever futzing with differing implementations of XMLHttpRequest to get the slightest practical result, you should be able to simply add the ScriptServer library to your page and then start coding as if JavaScript and PHP were one.

ScriptServer has got a ways to go before it's something you'd use in a public Website, but when the stars align and the wind blows the right way the alpha version is already quite a thing to see in action.

If being up to your elbows in JavaScript and PHP at the same time is your idea of a good time (I can't be the only one, surely...), then check out Harry's work and think about pitching in.

If not, just sleep sound in the knowledge that the Great Divide may be shrinking by the day.

Read the blog entry:

harry PHP Blog: Dynamically Typed
by Harry Fuecks

Crouching JavaScript, Hidden PHP [3] (22 comments)

Top


That's all for this issue -- thanks for reading! I'll see you in two weeks.

Kevin Yank
techtimes@sitepoint.com
Editor, The SitePoint Tech Times

Top


Help Your Friends Out

People you care about can benefit from the wealth of information on new and maturing technologies available on the Internet. Help them learn how to do it by forwarding them this issue of the SitePoint Tech Times!

Send this to a friend

Download free chapters from every SitePoint Book!

cover shotThe Flash Anthology: Cool Effects & Practical ActionScript
Steve Grosvenor


cover shotBuild Your Own ASP.NET Website Using C# & VB.NET
Zak Ruvalcaba


cover shotThe PHP Anthology: OO PHP Solutions
Harry Fuecks


cover shotHTML Utopia: Designing Without Tables Using CSS
Dan Shafer


cover shotBuild Your Own Database Driven Website Using PHP & MySQL
Kevin Yank

 

!More information about SitePoint Books

 New Technical Articles

More Usable Forms - Controlling Scroll Position

Robert
Symonds
By Robert Symonds

Make your forms more usable by controlling the user's scroll position after post-backs. Robert leverages JavaScript to implement this valuable functionality -- in your chosen server side language!

Introducing PHP 5's Standard Library

Harry Fuecks
By Harry Fuecks

Program reusable code easily with the Standard PHP Library extension. As Harry explains, this promising functionality snuck into PHP 5 without fanfare, but bodes extremely well for the future of standardised PHP development.

Get Started with Mono

Philip
Miseldine
By Philip Miseldine

The open source Mono project has been created to allow developers to code much of the .NET framework in cross-platform executable code. In his introduction to the technology, Philip uses Mono to code in C# for Linux.

Create Dynamic Pop-ups in XHTML 1.0 Strict Pages

Michael
Rainey
By Michael Rainey

Programming in XHTML Strict doesn't mean you can't use popups! Michael gets down and dirty with a few handy JavaScript tricks to create a popup that won't break your XHTML 1.0 Strict Web page.

 Hot, Techy Forum Threads
 More Techy Blog Entries

.NET Blog:
Daily Catch

PHP Blog:
Dynamically Typed

Open Source Blog:
Open Sourcery

ColdFusion Blog:
InFused

Manage Your Subscription Here.

!You are currently subscribed as to the HTML edition of the Tech Times.


CHANGE your email address here

UNSUBSCRIBE from the Tech Times here.

SUBSCRIBE to the Tech Times here.

SWAP to the 'Text-Only' version of the Tech Times here.


SitePoint is Hosted by
Ventures Online


Thanks for reading!

 © SitePoint 2004. All Rights Reserved.

Back to the archives

Newsletter signup

Design, coding, community or marketing? Select the right newsletters right for your needs...