JavaScript Archive

PHP $_COOKIE variable empty

The PHP $_COOKIE variable is a reserved variable and Array in PHP which contains cookies in the browser stored by PHP, Javascript and other languages. If for any reason you are using PHP setcookie() or Javascript document.cookie to set cookies and the PHP $_COOKIE variable remains empty it might actually be a server configuration that

jQuery Cancel Other Ajax Requests

For some reason, you might be submitting Ajax requests to the same URL for the same purpose and returning the same results but it happens that there are multiple Ajax requests just being redundant. Possibly a user interface where a user is making multiple selections on a page, one after the other and running multiple

jQuery delay function/method

New jQuery delay() method. More information and examples of the jQuery delay() function/method. Here is a quick example: jQuery('#mydiv').attr('value', "Button Text").delay(1500).queue(function() { alert('button text was changed'); });

jQuery : Auto iFrame Height

This article will show you how to automatically adjust the height of an iFrame to the height of the content inside of the iFrame with the use of the jQuery JavaScript library and the jQuery autoHeight plugin.

WordPress : Using jQuery library with your plugin or theme

When you develop a WordPress plugin or theme, you might want to make use of the jQuery library included and distributed with the WordPress package.

WordPress : Using Javascript libraries with your plugin or theme

When you develop a WordPress plugin or theme, you might want to make use of some of the Javascript libraries distributed with the WordPress package such as Prototype, Scriptaculous and jQuery.

Embed Quicktime Movie

Embedding a Quicktime movie player into your webpage work similarly to embedding Flash files, making use of the OBJECT, EMBED and PARAM tags inside your HTML code. You can play .MOV, .MP4 and .MPEG files with the embedded Quicktime movie player.

JavaScript : Increment & Decrement Variable Values

Using Javascript, you might want to define a variable when a page is loaded and change the value of that specific variable throughout the period of the interaction of the user with the page. You can define a variable in the HEAD section of the page like this :