// home

Latest Post

f-lv.com - download YouTube videos in FLV/MP4 format

After playing with the YouTube API and Python over the past week, I'am pleased to announce the launch of f-lv.com You will be able to : download your favorite YouTube videos in FLV/MP4 format email the video download link to your friend have a look at a nice carousel (thanks Bill for that) with the latest downloaded videos Site is [...]

Asides

  • 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 : Then place your stepper in your body : 10 px The stepperValue id will display the current value of the stepper. The stepperControls will contain the different controls for our stepper, and you can place it anywhere you want and use whatever images you want. Finally when the DOM is ready, instantiate the widget : YAHOO.util.Event.onDOMReady(function(){ var mystepper = new YAHOO.widget.Stepper(10, 'stepperUp', 'stepperDown', 0, 200, 10); mystepper.onChange.subscribe(function(){ YAHOO.util.Dom.get('stepperValue').innerHTML = mystepper.getValue() + ' px'; }); The stepper takes 6 parameters, all mandatory (check source code) : var mystepper = new YAHOO.widget.Stepper(10, 'stepperUp', 'stepperDown', 0, 200, 10); 1. the initial value 2. the ID of the element for the up control button 3. the ID of the element for the down control button 4. the minimum value the stepper can decreased to 5. the maximum value the stepper can increased to 6. by how much the stepper is incremented/decremented after each click We listen for any change to the stepper and in this case, display the updated value in the container we defined earlier on ( stepperValue) using innerHTML. mystepper.onChange.subscribe(function(){ YAHOO.util.Dom.get('stepperValue').innerHTML = mystepper.getValue() + ' px'; }); You can get the current value of the stepper by calling : var currentValue = mystepper.getValue(); Live demo Download source code (including demo) #