Why Register With OSV?

Join 5700+ of your peers

Get enriched. Access 1270+ quality tutorials right away on:

  • Joomla 2.5.X, 3.0.X
  • WordPress 3.5.X
  • Shopping Carts
  • E-Commerce Payment Gateways
  • PDFs for each tutorial - FREE for download
  • New topics and tutorials added weekly

FREE EBooks

FREE Templates

Member Login

Not a member yet? Sign Up!

Opensourcevarsity Logo
Tutorials & Training from experienced world class trainers
Welcome, Guest
Username Password: Remember me

Javascript "watermarks" for textboxes
(1 viewing) (1) Guest
All your queries regarding JavaScript will be solved in this forum
  • Page:
  • 1

TOPIC: Javascript "watermarks" for textboxes

Javascript "watermarks" for textboxes 2 years, 4 months ago #455

  • abott
  • OFFLINE
  • Senior Boarder
  • Posts: 63
  • Karma: 0
I would like to know how to put text in a textbox when the page loads. Example: If I have a page with labels and inputs, from that i would have two textboxes named "Start Date" and "End Date". When the page loads I want the the textbox to load with "dd/mm/yyyy" written inside, so I won't have to put a label for that outside. But when the user clicks inside textbox it should disppear. How do I do this?

Re: Javascript "watermarks" for textboxes 2 years, 4 months ago #472

  • patrica
  • OFFLINE
  • Senior Boarder
  • Posts: 68
  • Karma: 0
Javascript "watermarks" for textboxes can be done as shown in the following example

<input name="txtDate" on-focus="if (this.value=='dd/mm/yyyy') this.value = ''" type="text" value="dd/mm/yyyy">
  • Page:
  • 1
Time to create page: 1.17 seconds
O-S-V Free Templates

FREE HTML / Joomla / WordPress Templates For Download
Registration Required

CONNECT WITH US

Sitemap   |   Privacy Policy   |   MySQL(70)   |   Disclaimer   |   Reach Out To Us
Designed by Ivan Bayross & Meher Bala | Powered by Joomla
© 2013 All Rights Reserved.