" Life Is A Challenge - Meet It! Life Is A Song - Sing It! Life Is A Dream - Realize It! Life Is A Game - Play It! Life Is Love - Enjoy It! "  —  Bhagawan Sri Sathya Sai Baba

Posts Tagged  ›  Javascript

 

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