" In the beginning, all you need are basic writing implements "  —  K's Art

Posts Tagged  ›  Javascript

 

Tutorial: Easy “Spoiler” Show/Hide Element using Javascript

more...

Sometimes we want to hide some content at first page load to reduce bandwidth transferred to the user. Usually when we just want to show the thumbnails of the image and then the original (big) sized image hidden next to it.

more...

 

Validating Email Form Field Using PrototypeJS and Regular Expressions

more...

Annoyed with form submitters that keep fills the email form field with an invalid email? You can use javascript’s regular expressions to validate it. There’s so many regular expressions form to validate e-mail on the internet but many of them is very long and difficult to understand to modify to suit my need. The regular expressions is expressed below:

/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,60})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i

more...

 

Avoid CSS/Javascript XHTML Document Error Using CDATA

more...

Based on W3C Recommendation Document on XHTML 1.0 (Review Section: C.4. Embedded Style Sheets and Scripts), XHTML document don’t allow you to have any embedded stylesheet and/or script which using < or & or ]] or -- . We should use external stylesheet and/or script if we use any of those symbols, so XHTML parser could parse the XHTML document correctly.

more...