• Skip to content
  • Skip to primary sidebar

The html blog

The web sandbox

You are here: Home / Archives for Javascript

Javascript

Geolocate your visitors with PHP (part 2)

September 29, 2017 By thehtmlblog Leave a Comment

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. You must sign up for a Google Maps API key if you don’t already have one. […]

Filed Under: Javascript, php Tagged With: geolocalisation, geolocate, google maps, Javascript, mashup, maxmind, net, Net_GeoIP, pear, PHP

Expanding/collapsing javascript menu

September 29, 2017 By thehtmlblog Leave a Comment

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 GlassYUI effects widget. 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 menu itself and the […]

Filed Under: Javascript Tagged With: collapse, dav glass, dhtml, dom, effects, expand, Javascript, menu, newbie, slashdot, tutorial, yahoo, yui

YUI-based numeric stepper widget

September 29, 2017 By thehtmlblog Leave a Comment

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 […]

Filed Under: Javascript Tagged With: controls, dom, events, html xhtml, Javascript, numeric, stepper, widget, yahoo, yui

Simple YUI Cookie example – javascript text magnifier for your page

September 29, 2017 By thehtmlblog Leave a Comment

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 a block […]

Filed Under: Javascript Tagged With: cookie, css font dom, dom, Javascript, magnifier, text, xhtml, yahoo, yui

  • « Previous Page
  • Page 1
  • Page 2
  • Page 3

Primary Sidebar

Subscribe and never miss a post

Categories

  • Hosting
  • Javascript
  • php
  • Web
  • XML

Copyright © 2021 · htmlblog.net