Javascript based Light up effect concept

Technical, Javascript, 255 words  

This is an idea that I had just thought about for my website revamp and quickly coded up a simple proof of concept.

I wanted to simulate a lighting up of room effect via javascript. Yes it could easily be done in Flash but everything seems to be moving to javascript these days for obvious reasons (see html5 and google chrome).

Read more »

Undo a HTML select box selection

Javascript, 196 words  

When a select box requires on the fly validation, HTML and JavaScript doesn’t quite support any way of reverting to a previous choice if the validation fails. You cant trigger an onchange event without first updating the select box to a different value. On the other hand, onclick occurs before the choice is made.

If you set a “selected” tag within an option tag on page load, you can easily revert to a previous value by resetting the form or running reset() on the form. However this kinda makes the selected value pretty static.

Read more »

Prevent scrolling in Firefox via key press

Technical, Javascript, 205 words  

Firefox got me the other day with this one when I was trying to manually scroll the contents of an iframe because I was trying to achieve a bouncing effect when scrolling between different sections. And for some reason, Firefox would often mysteriously scroll me further then where I was suppose to go.

To best illustrate, have a look at this demo page which shows 2 iframes with slightly different content. In Safari and IE, using arrow up/down on both iframes examples will not scroll the text. However, in FF, if return false is not present in the event, then the scrolling will still occur.

Read more »

::

April 2024
Mon Tue Wed Thu Fri Sat Sun
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          
 << <   > >>
Brinley Ang

Brinley Ang is a software engineer, sysadmin, coder, geek boy, jedi knight fragger, caffine addict, deaf meloncholic and rockstar wannabe. Listens to the sex pistols and a wide assortment of heavy metal.

Make payments with PayPal - it's fast, free and secure!
Search
home | portfolio | blog | links | contact
© 2024 - Brinley Ang
Valid xhtml