My name is Edward Tanguay. I am a web developer in Berlin, Germany. I learn everything I can and record it on this site. Other things you might be looking for: My Ubuntu Tutorial My Datapod Project My Blog Feed:  |  - Code Examples
These are the latest code examples I've added. To find other code examples, use the search box in the upper-right.
|
This was a little experiment to get a useful base of cross-browser code that does some interactive stuff in Javascript. It is simple but handles mouseover, button highlight, and just has a nice, basic feel. The only issue is in Opera the text is at top of the buttons, but didn't have any nerves left for that one. At first I tried using :hover and :focus which brought me to the conclusion that this really isn't standard between the browsers so used onmouseover and onmouseout to deal with it. Also worked out a number of quirks that various browsers had, e.g. I removed the ugly dotted focus line in Firefox on the buttons, they left it there in Firefox 3 as well I noticed, I replaced it with a gradient background for the focussed button. So this code looks decent in Firefox 2/3, Internet Explorer 7 (probably 6 too), Opera 9.5 (in fact only after I upgraded from 8 did it show the background on the buttons), and Safari. The bad boy of the group is Opera, but since opera gets embedded in quite a number of devices these days (e.g. Philips TVs), you don't want to leave it out completely. You can view this example online here. Of course next step when implementing this is to make it read from a database or XML file, I just wanted to get the browser-compatibility as accurate as possible first.
post comment or questionpost comment or question |
|
|
post comment or questionpost comment or question |
|
|
This code runs in Explorer, Firefox, Opera and Safari, simple code that enables you to attach Javascript functions to button clicks, etc.
post comment or questionpost comment or question |
|
|
PHP CODE EXAMPLE
- added on June 30, 2008
If you have various translations of your website, a quick way to implement this is to have an .ini file with all the translations in it and read it out. This code shows you how to also use constants within the ini file.
post comment or questionpost comment or question |
|
|
CSS CODE EXAMPLE
- added on June 30, 2008
This CSS script give you absolute pixel-exact control of where to place text in a left and right area of a wide div, e.g. a header or footer. I was not able to get it to align automatically, e.g. left/center/right, so you have to know your font size and your text and position things exactly, but at least you have control, checked in Firefox and Explorer.
post comment or questionpost comment or question |
|
|
FLEX CODE EXAMPLE
- added on June 13, 2008
You can do a lot more with filters, e.g. dynamically change them in ActionScript but here is the syntax for a basic shadow filter on a text.
post comment or questionpost comment or question |
|
|
FLEX CODE EXAMPLE
- added on June 13, 2008
Check out this example here. This shows you the basics of using styles in flex, I did all of this with the FlexBuilder in design mode, very easy to use, when you are in a CSS file just click on design. The alpha transparency is wonderfully easy and the background picture leaves behind all the problems you have with page backgrounds in HTML/CSS, namely, it constantly resizes it, etc.
post comment or questionpost comment or question |
|
|
FLEX CODE EXAMPLE
- added on June 11, 2008
This is another example of access filesystem this time with ActionScript. Did an expanding window in this example, but there are some scrolling issues on this window I need to work out, couldn't find a scrollable=false in the application element. To try this example, download adobe air and then you can install this application.
post comment or questionpost comment or question |
|
|
FLEX CODE EXAMPLE
- added on June 10, 2008
This shows you the basics of getting access to files and directories with AIR using FileSystemTree and FileSystemDataGrid. Would be interesting to see how these work in Linux and Mac. To try this example, download adobe air and then you can install this application.
post comment or questionpost comment or question |
|
|
FLEX CODE EXAMPLE
- added on June 10, 2008
Here's how to get started with windows in an AIR application.
post comment or questionpost comment or question |
|
| My Free Tutorials: How to Install Ruby on Rails with Instant Rails and Create a Website Using JEdit and the Ruby Plugin Install a PHP Development Environment with Eclipse PDT, Apache 2.2, PHP 5, MySQL 5, and phpMyAdmin Using XAMPP Lite How to Install the Android SDK on Windows XP and Create an Application that Runs in the Cell Phone Emulator Install Ubuntu 7.04 in VMWare on Windows XP and connect it to your network Setup a PHP Development Environment on Windows XP With Apache, PHP 5, MySQL 5, SQLite, Eclipse, Subversion, PHPMyAdmin, and Datapod Install Java on Windows XP and Learn the Basics of Java 6 using the NetBeans IDE Install OpenSuse 10.2 in VMWare on Windows XP and connect it to your network Install Fedora 6 in VMWare on Windows XP and connect it to your network Install Perl 5 on Windows XP and Get a Perl Hello World Running How to Create a Website with Datapod  |