12 January 2009

Discovering Twitter

Twitter as we all know is the latest buzz word talked about over the Internet. For those who don't know Twitter is a free social networking service that allows its users to send and read other users' updates (otherwise known as tweets). You can read a hell lot about it on Wikipedia.

Excited and eager to check out this new website i immediately created and account and started tweeting(Check Out here). Guess what Twitter even has big celebrities like Britney Spears and popular people like the new US President Barak Obama having their own Twitter account(i don't think they actually post there though) which were recently Hacked!!

Initially i found the idea of tweeting quiet original and unique. But as with many things it soon got boring. The fact that i had to get people to follow me in order to view their tweets and updates is just so repeating procedure. Even most of my friends didn't reply to the invitations that i sent. For many people are getting tired of Social Networking sites.

But to be honest i was quiet disappointed !

Eventually i have discovered a good use of Twitter and that's using it to promote your site/blog and following some famous, geeky, new etc etc people!
Lets see if twitter can be the next big thing on the WEB especially since it has competitions like MySpace, Facebook & Orkut.

07 January 2009

Re Thinking Blogging Strategy ??

When i started blogging, I had a mission in my mind and it was to make $ money $....some really good $ money $ using various add programs like Google Adsense. The 'weapon' of my choice for a 'Blog Topic' naturally was by default Web Development as i was already into it.

But soon after searching various blogs, articles and stuff on Google Search (and even reading them) it just struck my mind that earning money from blogging no child's play!!
You gotta think...think and think before writing a good article, play with keywords and other SEO techniques and sit on your butt! for couple more hours in day to finally just get some Internet Traffic.

And even after doing all this activity on regular basis you have to pray that people who do visit your blog also mercy fully click on the ADDS!! Well its been three months for my blog and there's hardly any revenue form it!

Well the New Years here and so I have finally decided that its about time that I Re Think my Blogging Strategy ! should i continue Blogging ? should i change my Blog Topic ? should i buy a separate web space with my very own domain ? Uh.... So confusing .....

Anyway my Blog still helps me keep important piece of software CODE that i cant really remember in a place where i can find it easily and that too for ABSOLUTELY FREE!!
That's something that still kept me going on.

Well i am no J.K. Rowling to come up with exciting stuff each time to write on blogs, so changing the topic is just out of question!
Lets see where the light takes me........................................................

06 January 2009

Javascript for TextBox Restriction

JavaScript for restricting users from entering unwanted characters in a textbox/ text field.!
One of the easiest way of restricting a user from entering unwanted characters in a text field can be accomplished by using JavaScript functions as below:

<script type="text/javascript" language="javascript">
function keyRestrict(e, validchars)
{
var key='', keychar='';
key = getKeyCode(e);
if (key == null) return true;
keychar = String.fromCharCode(key);
keychar = keychar.toLowerCase();
validchars = validchars.toLowerCase();
if (validchars.indexOf(keychar) != -1)
return true;
if ( key==null || key==0 || key==8 || key==9 || key==13 || key==27 )
return true;
return false;
}

function getKeyCode(e)
{
if (window.event)
return window.event.keyCode;
else if (e)
return e.which;
else
return null;
}

</script>

After placing the above script in your head section of the web page all you need to do is call the function on the keypress event of a textbox/text field and pass in all the characters that you want to be allowed as follows:

< type="text" name="zip" id="zip" style="width:100px;" maxlength="7" onkeypress="return keyRestrict(event,'1234567890. ')" />>


Note: Please ensure that you conduct server side validations for user input, as JavaScript can be easily disabled in any browser and the above restrictions can be bypassed.