Category: html
-
JavaScript – Simple Helper Functions
Get an HTML object element function el(elementId){ var elementObject = null; try{ elementObject = document.all ? document.all[elementId] : document.getElementById(elementId); }catch(e){ // nothing to do } return elementObject; } Trim a string function trim(str) { return str.replace(/^\s*|\s*$/g,””); } Set focus on an HTML object element function focusElement(elementId){ try{ el(elementId).focus(); }catch(e){} } Move an HTML object element…
-
CSS – Styling HTML Links – removing underline
Simple Link styling Link: This Link to Google is Red Code: Link: This Link to Google is Red Link styling for visited links Link: This Link to my Blog is always Green Code: In order to make sure that the link color “sticks” even for visited links, use the following CSS. Link: This Link to…
-
JavaScript – Check and uncheck Checkboxes
Choose Your Favorite Programming Languages Java Python PHP HTML JavaScript SQL | Code: Your Favorite Scripts & Languages Java Python PHP HTML JavaScript SQL |
-
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
-
Tableless CSS – CSS Tables replacing HTML Tables
Examples of Pure CSS Tables which replace certain types of HTML Tables Tableless CSS – Example 1 This is Cell Nr. 1.1. row=1, column=1 This is Cell Nr. 1.2. row=1, column=2 This is Cell Nr. 1.3. row=1, column=3 This is Cell Nr. 2.1. row=2, column=1 This is Cell Nr. 2.2. row=2, column=2 This is Cell…