Archive for the 'javascript' Category

Geolocate your visitors with PHP (part 2)

Wednesday, July 30th, 2008

In the first part of this series I showed how you could get the country of a visitor via his IP address. Now with this precious information, I’ll show you how to map the visitor visually on the world map using Google Maps.
Sample preview.
You must sign up for a Google Maps API key if you [...]

Expanding/collapsing javascript menu

Thursday, July 17th, 2008

In this post I’ll show you how to create an expanding/collapsing menu like Slashdot left menu used to be, using the YUI library and Dav Glass YUI effects widget.
Preview of the script we are going to build.
The HTML markup for our menu is :
 <div id="menu"><h1 id="menu-title">Menu</h1><div id="menu-links"><ul><li>Home</li><li>About</li><li>CSS</li></ul></div></div> 
We use 2 div tags, one for holding the [...]

YUI-based numeric stepper widget

Monday, July 14th, 2008

Since I had some problems with YUI slider, I decided to write a YUI-based numeric stepper that allows users to select values within a predefined range.
To instantiate the widget include the following files :
 
<!– CSS –>
<link rel="stylesheet" type="text/css" href="stepper/stepper.css" />
 
<!– Dependencies –>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/yahoo-dom-event/yahoo-dom-event.js"></script>
 
<!– Stepper source file –>
<script type="text/javascript" src="stepper/stepper-min.js"></script>
 
Then place your stepper in your [...]

10 starting signs of a good web developer (php version)

Saturday, July 5th, 2008

Nowadays many people call themselves PHP programmers / web developers as soon as they know a bit of Frontpage or using Dreamweaver to generate the code for them. But are they really good web developers? Here’s my top 10 characteristics of good web developers, feel free to comment.
1. Ability to hand code
Instead of using an [...]

Simple YUI Cookie example - javascript text magnifier for your page

Monday, June 30th, 2008

Since YUI 2.5.0 there’s the Cookie utility and at this time of posting, it’s still in beta version.
I’ll show you how we can use this simple utility to write a small javascript app.
The piece of code we will be writing, using the YUI library (my favorite), will allow users to increase/decrease their font size for [...]

my top 10 websites everyday

Wednesday, May 28th, 2008

Before starting work everyday and while waiting Eclipse (PDT) to patiently build my projects, here are my favorite websites I must visit ranked in my personal order of preference :

http://del.icio.us/popular/ - Helps me find interesting links for day-to-day work such as a new javascript framework, php tips/tricks, etc. Prefer it over digg
http://www.thesun.co.uk/sol/homepage/sport/ - Get the [...]

orange.mu, 1 month after

Wednesday, May 21st, 2008

It has been 1 month since www.orange.mu was launched and overall I’am quite satisfied with the new portal, compared to the old Servihoo one.
The main features which I’am very satisfied, from a technical point of view :

built on bleeding edge technology (does anyone hear memcache here ;-))
almost all pages are valid XHTML 1.0 transitional (i [...]

Ships and lighthouses, on Rails!

Monday, June 25th, 2007

Een schip op het strand is een baken in zee.
[A ship on the beach is a lighthouse to the sea.]
- old dutch proverb

Steve Yegge, one of my developer idols, has accomplished quite a feat, demonstrated at Foo Camp; porting Rails over to Javascript. However, this task took him 6 months and 2000 hours, according to [...]