Code Is Poetry

Welcome to jsonlau.com, the official documentation, and distribution hub for applications which are developed by me, Jason Lau.

I am a freelance web-developer, web-programmer, and software designer from the United States. I built my first webpage in 1994 and have since developed numerous popular, open-source programs and plugins for jQuery, WordPress, PHP-Nuke, SwishMax and more. Hundreds-of-thousands of copies of my works have been downloaded and used by companies and individuals all over the world.

This website contains official documentation for some of my projects.

This is an example of some code

<div id="mydiv" class="jlembed" data-id="myplayer" data-mode="youtube" data-chromeless="false" data-src="UrVp2BMvtaU,JbWN1CPiCnk" data-width="480" data-height="295" data-autoplay="true" data-caption="This is my song." data-controls="true" data-debug="true" data-stop_onerror="true" data-error_alert="true" data-screw="true"></div>

A Better Form – Examples

This page contains various and sundry examples which may help you get the most out of A Better Form.
Continue reading »

jlEmbed YouTube API

If you’re interested in this, you might also like my ytPlayer at http://ytplayer.com.

jlEmbed version 5.0.0+ only.
jlEmbed includes an array of YouTube API functions to help you interact with the YouTube player and service.
These functions will help you create and control a custom YouTube video player.
Example:

$("#currentPlayerState").val(jlembed_getPlayerState(playerId));

Below is a complete list of jlEmbed’s YouTube API functions.

For a more detailed description of each function’s purpose, please refer to this YouTube Javascript API Reference Page.

Continue reading »

A Better Form – Language

This page lists all of ABetterForm’s available language options. Language options define ABetterForm’s language output.

Below is an example of how language options are used.

$("my-div").abform({
alert_invalid_email: 'Invalid Email!',
alert_invalid_url: 'Invalid Link!'
});

Continue reading »

A Better Form – Classes

This page lists all of ABetterForm’s available classes. Classes define and control the behavior of ABetterForm’s validation and submission processes.

Below is an example of how classes are used.

The classes are located in the class attribute.

Or if you’re using the convert option:

convert: '{my-div|text|class="abrequired abtest" rel="@#%<>"}'

Continue reading »

A Better Form – Options

This page lists all of ABetterForm’s available options. Options define and control the behavior of ABetterForm.

Below is an example of how options are used.

jQuery("#my-div").abform({
// Options go here. Separate options with a comma.
json_form: 'myform.txt',
pluggable: myFunction,
submit_class: 'absubmit'
// No comma following the last option!
// End options
});

Continue reading »

A Better Form – A jQuery Plugin

A Better Form is a jQuery plugin I designed to help stop automated form submissions. A Better Form can dramatically reduce or completely eliminate spam comments, email spam, spam articles, and other kinds of automated spam.

How Does It Work?

A Better Form creates a hostile environment for bots by performing a number of tasks, checks, and balances. Continue reading »

jlEmbed Examples

Below are some examples which demonstrate each of jlEmbed’s modes for jlEmbed version 5.0.0+ only. Remember to include the latest version of jQuery in your document before including jlEmbed. For best results, check frequently for updates to jlEmbed and maintain a local copy of the current version. Continue reading »

jlEmbed Options

This page lists all of jlEmbed’s available options for each mode for jlEmbed version 5.0.0+ only. Options define and control the behavior of jlEmbed.

Below is an example of how jlEmbed’s options are used.

Options are defined as attributes in an HTML object. Each option is prefixed with data-. The following example embeds a custom YouTube playlist.

<div id="mydiv" class="jlembed" data-id="myplayer" data-mode="youtube" data-chromeless="false" data-src="UrVp2BMvtaU,JbWN1CPiCnk" data-width="480" data-height="295" data-autoplay="true" data-caption="This is my song." data-controls="true" data-debug="true" data-stop_onerror="true" data-error_alert="true" data-screw="true"></div>

Continue reading »

jlEmbed – A jQuery Plugin For Embedding Media

jlEmbed is a plugin for jQuery, which makes it easier to add embedded media players to your webpage. With support for Adobe Flash, Quicktime, Real Player, Silverlight, Windows Media Player, and YouTube, you will no longer need to hard-code lengthy, cumbersome, and invalid HTML for your music or videos. jlEmbed also has built-in music playlist support, a customizable MP3, SWF, FLV, YouTube audio player, support for swfobject, YouTube videos, and custom YouTube video playlists. Continue reading »

SWF Capabilities – Flash Cookies JavaScript API

SWF-Capabilities is a tiny Flash application I wrote which provides a JavaScript API designed so webmasters can utilize Flash’s persistant Local SharedObject (Flash cookies). Better than browser cookies, Flash’s Local SharedObject enable you to store limited amounts of data on a user’s local computer which can then be reaccessed at a later time. Continue reading »