Monday, May 31, 2010

Disable copy and paste into form text field

People sometimes got lazy just to enter information such thing like this below :

your email :
confirm your email :

the second question to confirm your email address, or to be exact, to retype again the email address is having a purpose to minimize the typo or any other problem like incorrect email address, or by mistake, entering another person email address.

but because of laziness, many times for second question, people just do copy and paste, ctrl-c and ctrl-v to that column, so at this point, the purpose of having second question is no longer valid anymore.

to prevent such behaviour, here is simple trick on the HTML form.

<input type="text" class="medium" name="contactEmail2" id="contactEmail2" onCopy="return false" onDrag="return false" onDrop="return false" onPaste="return false" tabindex="23"/>

with that addition, people are no longer able to do paste/ctrl-v into it.

Monday, May 24, 2010

Put ipv6 configuration on linux

I always need this once a while and always forgot it, so this is my note on ipv6 for linux (Fedora flavor of course :) ).

/sbin/vconfig add eth0 600
/sbin/ifconfig eth0.600 up
/sbin/ifconfig eth0.600 inet6 add 2001:AA00:F:F::2/64
/sbin/route -A inet6 add ::/0 gw 2001:AA00:f:f::1


last archive