input type w/ value but automatically disappear when click

  • ultimate11
  • Student
  • Student
  • ultimate11
  • Posts: 86

Post 3+ Months Ago

guys here is the scenario: i want to show some value in the input type but when the viewer will click and input a value the predefined value would disappear. :2gunfire:
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • yuryk
  • Born
  • Born
  • yuryk
  • Posts: 2

Post 3+ Months Ago

This should work:

Code: [ Select ]
<input type="textbox" name="samplefield" value="sample value" onclick="this.form.samplefield.value=''">
  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England

Post 3+ Months Ago

I wanted to do this a bit ago so I will linkyou to my post http://www.ozzu.com/website-design-forum/watermark-search-box-t101212.html the problem with the way above (it will work though) is that EVERY time you click on the filed and text you have will be deleted regardless if you want it to or not.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 94 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.