Javascript

Error message

Deprecated function: Function create_function() is deprecated in GeSHi->_optimize_regexp_list_tokens_to_string() (line 4698 of /home/digipiph/public_html/sites/all/libraries/geshi/geshi.php).

Getting Radio Button Values using jQuery and Javascript

There are many different ways to get the values of checkboxes using javascript or jQuery. I have assembled a list of some of the most popular methods.

Getting Radio Value using Name Attribute and jQuery

This method uses jQuery to select the DOM object via the name and property selector.

Building a Dynamic or Adding to a Javascript Namespace

Here is a quick example at how to build to an existing javascript name space. It is also used at building dynamic namespaces.

Creating Namespaces with Javascript

The below example shows how to create namespaces with javascript.

Creating Sprite (character) Movement with Javascript and jQuery Ver. 1.2

See Digipiph Game Manager, a HTML5 framework to create character based, moveable sprites and much more!

Skip the theory and walk through and learn by example. Click here to see the demo.

Creating Sprite (character) Movement with Javascript and jQuery Ver. 1.1

See Digipiph Game Manager, a HTML5 framework to create character based, moveable sprites and much more!

UPDATE: See the newer version 1.2

Creating Sprite (character) Movement with Javascript and jQuery Ver. 1.0

See Digipiph Game Manager, a HTML5 framework to create character based, moveable sprites and much more!

UPDATE: See step 2 (ver. 1.1).

Prevent Spam without Captcha

The following will show you how to prevent spam without the use of those annoying captcha images. I use javascript, which according to W3C, approximately 95% of the people browsing the web have it enabled. The odds of one of your visitors having it disabled is slim. If it does concern you however, you could always place a notice to turn on javascript before using the form or you could always use another method, just place the other method in tags.

Below is how you could prevent spam with simple javascript.

Latitude and Longitude of a location using Javascript and Google

The following Javascript will help you acquire the latitude and longitude of a location (using an address, zip code, or city).

Note: You will need to have a Google API key which is domain specific.

Javascript broke with multiple line variables from PHP

I have several sites where I use a pop up table to display information if the user rolls over and image.

Example, if the user wants to view notes on a certain client, they can roll over a little "note" image to view the notes about the client pulled from a SQL database.

The code I use for a message may be:

Creating a Pop Up Window with Javascript

This part goes in the link tag:Here is how to create a simple pop-up window using simple javascript.

Create a pop-up window on page load:

Subscribe to RSS - Javascript