Archive for the ‘HTML’ Category

Remove blank lines from a textarea using Prototype

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:

Internet Explorer bug – duplicate characters

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 ...

Diacritics in web pages

Saturday, October 20th, 2007

The usage of diacritics in web pages requires Unicode encoding. In the head section of the page (between <head> and </head>) you need to insert this line: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Here is a list with the corresponding HTML codes of the romanian diacritics : ă > ă Ă > Ă î > ...