Re: Remove value of input element onfocus



> The value attribute is a primitive string, so it is always passed
> by value. In other words, "x" is a new variable containing the
> same value as the argument. Changing it only changes the copy.
>
> On the other hand, the keyword "this" is a reference to an Object, so
> if you pass it, you can change the attributes of the Object that it
> refers to. Also, you probably want to use the onfocus handler, not
> the onclick:
>
> function removeinput(x) {
> if (x.value == 'Enter items not on standard list here...') {
> x.value = '';
> }
> }
>
> onfocus="removeinput(this);"

Thanks a bunch. It works great, and now I understand a bit more about the
concept.


.



Relevant Pages

  • Newtons Mechanics only valid from nonaccelerating frame of reference?
    ... froma nonaccelerating frame of reference"? ... Thanks a bunch (I've already tried google search) ... Prev by Date: ...
    (sci.physics)
  • Re: Screw earth clamps for welding
    ... A bunch of very useful stuff on the projects page! ... The article you reference below is excellent, ... > GWE ... Prev by Date: ...
    (rec.crafts.metalworking)
  • Re: ImageCombo Settings
    ... You'd want to set an object reference if you wanted ... Dim Item As ComboItem ... The object variable Item is assigned a reference to the first ComboItem ... The Call keyword is always optional, but if you use it, your ...
    (microsoft.public.vb.controls)
  • Re: ImageCombo Settings
    ... You'd want to set an object reference if you wanted ... Dim Item As ComboItem ... The object variable Item is assigned a reference to the first ComboItem ... The Call keyword is always optional, but if you use it, your ...
    (microsoft.public.vb.controls)
  • Re: Me!
    ... The Me keyword is a Visual Basic reference. ... of a control (like the Row Source of a combo box), ... Products that are related to the Product Type I selected in the cboTypes. ...
    (microsoft.public.access.forms)