Wednesday, February 18th, 2009
Here is a JavaScript function used to remove blank lines from a textarea. This snippet is using the Prototype JavaScript framework
function removeBlankLines(field)
{
$(field).value=$(field).value.gsub(/\s+/, '\r\n');
}
You can use it with "onblur" attribute:
Posted in HTML, JavaScript, Programming | No Comments »
Wednesday, December 10th, 2008
This is a small snippet to remove the spaces from an input field using JavaScript. It can be useful when you want a value without spaces, or when you want to replace the spaces from the input field with other characters.
The JavaScript code:
function stripspaces(input)
{
input.value = input.value.replace(/\s/gi,"");
...
Posted in JavaScript, Programming | 1 Comment »
Sunday, March 2nd, 2008
One of Internet Explorer versions 6 and 7 bugs, consists in repeating (duplicating) some characters from the end of some elements with the CSS atribute - float.
What's triggering this bug:
Using HTML comments inserted between the elemens with the float attribute.
Hidden elements using display: none
Solutions to prevent the duplication of the ...
Posted in CSS, HTML, Programming, Software | No Comments »