IN Code

Clear Text On Input Field On Click

posted Saturday, September 13th, 2008

Ever wanted to add text to your input fields and have it disappear when your visitor starts adding their info?

Better still, have it reappear if the visitor adds nothing?

Like this:

Here’s the code:

<input type="text" name="field-name-here" onclick="this.value='';" onfocus="this.select()" onblur="this.value=!this.value?'Enter Email To Get Updates':this.value;" value="Enter Email To Get Updates" />

Replace Enter Email To Get Updates with your own text.

Just a simple technique which works great.
continue reading…

Separate Your Trackbacks From Your Comments

posted Thursday, August 7th, 2008

It is amazing how many blogs do not do this. They have the messiest comments section with a zillion comments, trackbacks and pingbacks all jumbled up. And it is almost impossible to make some sense of out of the entire mess. Want to follow the conversation? Try evading the trackbacks and pingbacks along the way.

What’s the solution?

Separate the two, of course.

But How?

That’s a good question. You will find plugins that do this but if you can manage something in the theme design, it is best to do so rather than install plugin upon plugin. Plugins are best used where you cannot achieve your objective without touching the core WordPress files.

continue reading…

Adding Live Preview For Comments

posted Wednesday, August 6th, 2008

If you scroll down you will see a live preview option for comments. Just try it out by typing in a comment. Pretty cool, huh!?

A friend asked me why this was useful and why anyone will want to see their comment twice?

My answer: If your comment is pretty long, the textarea will start to scroll and you won’t be able to look at your entire comment in on go. The preview on the other hand shows the comment in its entirety. This way you can see how it looks and proof read with ease before you post.

continue reading…

A Little Hack to Get Your Password Back

posted Friday, August 1st, 2008

This can either be a very useful or a very dangerous trick depending on how it is used or abused.

I found this little tip at: FiddyP (it’s a really cool blog btw).

It only works in Firefix and boy does it work!

If you have a stored password that you can’t remember and all you can see are asteriks, just add this line to the address bar:

javascript:var els = document.getElementsByTagName('input'); for(var x=0; x<els.length; x++){ if(els[x].type.toLowerCase() == 'password' ){ var test = els[x].type = 'text';}}

Press enter and wait to be pleasantly or unpleasantly surprised to see your password staring back at you.