Although most of our companies work is template based design, end result is always unique and adapts to each client's individual needs. The process of merging a client's content and style with our templates creates an opportunity to challenge ourselves and once again put our web design skills to test. Recently, I found myself in a situation where it was necessary to pass information in form of GET data from a simple flash button to a server side scripting language- all without reloading current page. A client was running several different flash animated banners ads via XML layer popup, underlining some of her most popular website products and online services. She needed a simple way to track overall efficiency of her small ad campaign. Specifically, she needed to know which banners were being clicked on and which banners were simply annoying or inconsequential to her client base. She also needed to know which were most popular browsers accessing these pages.
I'll try to describe what needed to happen with out getting too techie.
An XML layer popup would pop up, offering end user with a two options. In Option A, one could click on cute little popup. This would take them to wherever popup was designed to take them. Option B was for end user to close popup, and that would simply hide XML layer's visibility property. At first, it sounded easy. However, beyond obvious functionality of options A and B, each option needed to open, write, and save to an external file all without refreshing current page. After all, last thing anyone wants to see after closing a popup is another page pop up.
Nevertheless server side scripting languages, like PHP, require a refresh of page to pass information. Unlike JavaScript which handles its business on client side of a client server system via your browser (the client), PHP scripts are server-side because they operate solely on server; data is sent to via POST or GET The script is then parsed, and new data is sent back to browser if necessary.
Here's solution. I created following <iframe>.