Project / Support Center
Welcome, Guest. Please login or register. October 24, 2021, 01:41: PM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  Javascripting  |  Topic: Select content of a Text field or Textarea when a user clicks in the text field 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: Select content of a Text field or Textarea when a user clicks in the text field  (Read 6247 times)
admin
Guest
« on: April 22, 2010, 11:16: AM »

Add this little script either in the head area or even before the field being used

<script type="text/javascript">
function SelectAll(id)
{
    document.getElementById(id).focus();
    document.getElementById(id).select();
}
</script>


Sample of text field  - the Bold needs to be added to the field information


                              <label>
                              <input name="textfield" type="text"  id="txtfld" onClick="SelectAll('txtfld');" class="form_input_required_menu" value="Value showing within the field" size="65" />
Report to moderator   Logged
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  Javascripting  |  Topic: Select content of a Text field or Textarea when a user clicks in the text field « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!