How to have a default value in the inputField in Visual Force in a blur format, For e.g. to enter a Number field : the value should be 'Enter a Number'.
As soon as the user clicks to enter the value in the inputField, it should not display anything.
Any advice.
Attribution to: Roshan
Possible Suggestion/Solution #1
I figured it out in both the ways : for html and apex vf tags. Please find below the code.
Jquery Plugin was the solution.
<apex:includeScript value="http://digitalbush.com/files/jquery/watermarkinput/beta1/jquery.watermarkinput.js"/>
I used the above JQuery Plugin.
var j$ = jQuery.noConflict(); j$(document).ready(function(j$){ j$('[id$=temp]').Watermark("Enter your Name"); });
<apex:inputText value="{!strTemp}" id="temp"/>
Attribution to: Roshan
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/3500