Un-fixing Fixed Elements with CSS Transforms

In Chrome version 41, DIV element with fixed position had additional offset – offset that shouldn’t appear. After googling for a while, I have found the the cause of such behaviour – CSS transform style on parent container. Disabling transform style has fixed the problem.

Categories Web

Adding table rows and columns in JavaScript

With insertRow() method you can insert a new row at the specified position in HTML table. After row is created, use insertCell() method to insert a table cell. Wrap this methods in JavaScript functions and you have code to dynamically add new rows and columns in the HTML table.

Drawing with JavaScript

This post shows simple JavaScript drawing script based on HTML table. After page is loaded, JavaScript will generate HTML table and attach onMouseDown / onMouseUp event handlers to the document level and onMouseOver to each table cell. When user clicks the left mouse button and move mouse pointer over table, TD will change background colour.

Clear form with JavaScript

JavaScript is the only option, if you want to have the ability to clear all form fields. Yes, HTML form has Reset method, but if the form has initial values, then Reset will return the form to the initial state instead of clear input fields. In this post you will find clearForms JavaScript function and live demo.