Category: programming
-
PHP – Reliable Array Size
Code: function size($array) { if (isset($array) && is_array($array)) { return sizeof($array); } return 0; }
-
PHP – make an array unique – remove duplicates
Code: /** * Removes duplicate keys from an array * * @param array $array * @return array */ function array_unique_key($array) { $result = array(); foreach (array_unique(array_keys($array)) as $tvalue) { $result[$tvalue] = $array[$tvalue]; } return $result; }
-
JavaScript – Postload Page Images
Code: Post Load Images Image 1 (load later ) Image 2 (load later ) Image 3 – normals on start up
-
JavaScript – dynamically create IFrame overlay
URL: Create IFRAME Overlay Hide IFRAME Overlay Code: URL: Create IFRAME Overlay Hide IFRAME Overlay
-
JavaScript – Stateful HTML Forms – Save and Recover HTML Form Data
<script language="javascript" type="text/javascript"><br /> /* <![CDATA[ */ var FS_INCLUDE_NAMES = 0, FS_EXCLUDE_NAMES = 1, FS_INCLUDE_IDS = 2, FS_EXCLUDE_IDS = 3, FS_INCLUDE_CLASSES = 4, FS_EXCLUDE_CLASSES = 5; function retrieveCookie( cookieName ) { /* retrieved in the format cookieName4=value; cookieName3=value; cookieName2=value; cookieName1=value only cookies for this domain and path will be retrieved */ var cookieJar = document.cookie.split(…
-
JavaScript – Disable Button on Submit
Form Submit – disable on submit Nickname: Enable Submit Button Code: Form Submit – disable on submit Nickname: Enable Submit Button
-
Fisheye-Like Hover Pagination Links Using Pure CSS
The pagination links are history aware and zoom upon mouse over. 1 2 3 4 5 Code: 1 2 3 4 5