So I'm sure some of you out there have run into a problem where you want to close a Internet Explorer window (that wasn't created via script) and get the following IE warning "Do you want to close this window?".
I've run into this problem a few times in the past, specifically trying to close a browser window that was opened with target="_blank", etc. Today's problem was related to a client side Google Earth application where placemarks were going to open a window and play a movie. The problem is that Google Earth (not to be confused with Google Maps) does not support javascript within the placemark at this time. So to open a browser, size it and remove features (ie: toolbars, etc), I had to get crafty.
What I ended up doing in the end was create a relay script. Google Earth opens a new page (using target="_blank" in the HTML) which opens my relay script. That page, in turn, opens a 'sized' popup and closes the parent (relay script). Here is where the IE warning occurs. I first tested with IE6 and easily worked my way around it by using the following browser hack:
Bookmark to:
What books do I read?
The library is back in action! If anyone has any recommendations, please let me know and I'll get them in there. Most of the books in the library now are books that I have on my shelves now, or books that have helped in the past, that are worth recommending.
On those lines, I often get asked what books I have on my desk now, and 'why' do I still buy books since alot of the information is on the web any way (and books are commonly out of date with the speed of technology and methologies growing on a daily basis).
First question: "What books do I have on my desk now".
Well, I'm way into AJaX (Asynchronus Javascript and XML) lately, and with the movement of Web2.0, interactive web applications acting like software apps is the hot style right now. So I have two books with coffee ring stains..
Professional Ajax (Wrox) - Zakas, McPeak, Fawcett
Bruce Perry's Ajax Hacks (O'Reilly)
SoloSEO - Search Engine Optimization Tools!
With this sponsored post I would like to talk about SoloSEO seo software which gives you a suite of web based tools to manage and optimize your SEO (Search Engine Optimization).
Over the years I've seen various tools to generate keywords, etc. and I never really see anything that pushes it up a notch. Generating good PR (page rank), you need a few things in place. Keywords, backlinks, rich content are just a few ingredients in the pie to make a site successful.
Bookmark to:
Understand your server environment to maximize your programming skills and security
Throughout my years of programming, I've often seen two camps, the programmer and the server administrator. Often these two camps don't see eye to eye and difficulties can arise. This is mainly due to a lack of understanding between the two departments. The server administrator does not see the scope of completing the job for a demanding client, and the programmer does not see potential issues with misconfigured and poorly programmed applications being introduced to a server, where other services could be heavily impacted. I almost believe they focus on the opposite, and in reality, we as programmers, should be really viewing their priorities, since we all want to have secure applications in the end.
As a programmer, I see great benefit learning the environment where your application will reside. Over the last few years I've been heavily involved Linux server administration. My application have been mainly written to use the LAMP environment (Linux Apache Mysql Php). Because of this, I thought becoming fluent in Linux administration could help bridge the gap between myself and server administrators, since a majority of my clients use Linux servers.
Bookmark to:
PHP and GD for generating and cropping avatars
Since I'm still on a major GD kick, I wanted to talk about a new trick that I'm using to generate avatars on the fly. This technique uses a single file, crops that image to be centered (left/right) and outputs a square avatar at set dimensions. Since this is using GD, we're actually creating the image and not simply resizing it via the img tag.
I'm using two custom user defined functions (resizeToMin() and getImageType()) to help with the calculations on the dimension and the file types. getImageType uses the exif extension of PHP, so you'll need to be sure that you have exif support built in. This may require a re-compile of PHP. If you do not wish to use exif (shame on you), you can handle type based off of the file extension, but there might be security issues related to that... or at the very least, possible error issues.
The reason I want to determine file type is to know which functions to call, since functions are specific to jpg or gif, etc (for example: imagejpeg() vs imagegif()) .
Bookmark to:
Platinax Business Form -- Resource for Webmasters
With this sponsored post, I would like to talk about Platinax and their Business Forum . Now, what does a business forum have to do with the programming and code repository / how-to site? Simple, this business forum covers various aspects of internet business ranging from start-ups to web hosting and design/coding and could be extremely beneficial to the coders out there.
I like to think of coders in two different camps. The first camps are programmers that work for various corporations and business doing web development and such. The other set of coders are individuals with their own start-ups that are trying to make it on their own on the internet arena. Regardless of what camp you are in you could benefit from learning new techniques to promote yourself or your clients.
Bookmark to:
Overlay text using PHP and GD
Today I would like to discuss using the GD library to render text on top of existing images. This could be nicely applied for customized error messages or watermarking your existing image 'on-the-fly'.
The GD Library is a open source library for the dynamic creation of images by programmers. You must first ensure that your PHP has support for the GD library. Depending on your situation or environment, you may need to rebuild/recompile PHP with --with-gd in your configuration flags. It might also be useful to compile with --with-exif as well. Exif extension you will be able to read stored header information in the graphic file. Since this example is using text overlay, you'll need to ensure that your PHP also has freetype support built in (--with-freetype-dir=/usr).
For more information on GD and PHP with GD please check out the links below:
http://libgd.org/Main_Page
http://us.php.net/manual/en/ref.image.php
