JK Web Studio is a small web design studio, specializing in efficient and user friendly solutions.

Contact us at info@jkwebstudio.com

Detect IE7 in JS

June 30th, 2009

if (window.XMLHttpRequest) {
// IE 7, mozilla, safari, opera 9
} else {
// IE6, older browsers
}

Using JavaScript to read CSS from external file

June 30th, 2009

function get_style( obj, cssprop ){
if (obj.currentStyle){ // IE
return obj.currentStyle[cssprop];
}else if (document.defaultView && document.defaultView.getComputedStyle){ // DOM
return document.defaultView.getComputedStyle(obj, “”)[cssprop];
}else{ // get inline style
return obj.style[cssprop];
}
}

Using split to get away from using the evil eval()

March 19th, 2009

Great article about the flickr people selector widget, and its use of a custom format to quickly get data from the server to JavaSrcipt: http://code.flickr.com/blog/2009/03/18/building-fast-client-side-searches/

Testing Contribute

February 26th, 2009

I’m testing Adobe Contribute C4 for this entry. I’m wondering how it will go.
So far so good. I was able to publish the entry, and now I’m editing it. Smooth sailing so far.

Microsoft’s Internet Strategy

February 1st, 2008

I’ve been following, but not commenting on, a few Microsoft developments lately. They have been pretty big from a web developer’s point of view. But today’s announcement may be the biggest of all, and could potentially affect the entire web as we know it. But let’s look at all the events in order:

IE8 passes the Acid 2 test

Great news for web developers and web users alike. According to the IE blog, the next version of the biggest browser will pass the Acid 2 test. For the non-web developers out there, here is what Microsoft writes:

Acid2 is one test of how modern browsers work with some specific features across several different web standards.

What is means is, that web development will be easier, and web browsing will be richer, and both will be more exciting.

New Version targeting in IE8

Microsoft is apparently introducing a new way of browser targeting in IE8. The main idea is that unless the web developer specifically states that a web page should be rendered as the newest, or any other specific IE version, it will be rendered as IE7.

To make the page render with the newest IE rendering engine, insert in your page header:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

To Make it render using a specific version, insert:

<meta http-equiv="X-UA-Compatible" content="IE=8" />

To make it render as IE7, do noting…

To me, and apparently many others, this seems a little strange. I think it would be much more logical to get rid of the ‘edge’ version, make newest version the default version if you don’t insert the tag, and let web developers insert the specific target if they desire.

As far as I understand, this is still a draft, and could change before IE8 ships.

Microsoft bids $44.6 billion for Yahoo

Microsoft is ready to purchase one of the biggest players on the web, Yahoo. Wow. I’m not sure how this is going to play out, but it’s big news, and it looks like a change in strategy from the folks in Redmond. Microsoft has always been about developing their own products, usually becoming industry giants in the process. However, this must be seen as a realization that in the search market, they can not compete with Google on their own. It will be very interesting to see how it plays out.

Serve PHP from file types

December 13th, 2007

Serving PHP code from files with different file extensions is quite easy to do on Apache. Simply add the following to you httpd.conf:

AddType application/x-httpd-php .html

All your .html files will now be served as php.

AirPort Express

December 3rd, 2007

In theory the AirPort Express is great. Add it to your wireless network, and you can stream music from iTunes to your stereo. Wow, cool, right?

Well, here are some pitfalls we’ve run into:

If you have an active wireless connection and a wired connection to the same computer, and you try to stream music to the AirPort Express, the two different connections may interfer, resulting in dropped a link to the AirPort Express.

Solution: do not connect wirelessly to you network if you are also hardwired directly to the router.

If you use WPA wireless security, you may loose the link to your AirPort Express any time for no apparent reason. It appears that the AirPort Express is dropped from the WPA network whenever the key is renewed.

Solution: use (less secure) WEP security instead.

Kudos to Sectorlink

November 30th, 2007

I’ve been recommending Sectorlink as a reliable and friendly web host to all my clients for years now. Of course it doesn’t hurt that they’re also very price competitive…

It wasn’t until earlier this year, when I registered jkwebstudio.com, that I started using Sectorlink myself. I’ve been lucky enough to have an arrangement with a former employer about about hosting my other domains. But this time I signed up with Sectorlink, and I have been very happy so far. Especially the customer service is simply outstanding.

Just take my latest two issues.

A few weeks ago I started looking into using CGI for uploading files. My current solution uses PHP, but PHP has a built in limitation on file sizes that prevents anything larger than 2 MB uploads. I’d never written CGI scripts before, so I was having some beginner problems. I opened a technical support ticket with Sectorlink, and within hours they provided me with a working “Hello World” script to get me started down the CGI path.

Today I had another great experience with customer support. For some reason my php upload scripts did no longer work. I think this was caused by Sectorlink’s switch to no longer supporting PHP4, resulting in my account running in safe mode. After notifying Sectorlink about this, it took less than 20 mins for it to be resolved.

So I’ll keep recommending Sectorlink. They are fast and responsive, and in case you’re wondering, no, I’m not in any way affiliated with them.

Billund Airport

August 16th, 2007

Billund Airport

more apache setup

July 28th, 2007

As a follow-up to my previous post about setting up apache, php and mysql on windows vista, here are some useful links:

Setting Up Multiple Apache Local Web Sites On Your Computer

Changing your hosts file in Vista