Very Simple Input Overlay


I have been growing increasingly dissatisfied with the solution for overlay texts on input controls I have been using, so I decided to come up with a new system which would be easier to implement and maintain. I found this article by Sam Dunn but I found it somewhat unpolished so I worked on it a bit to make it smoother to use. Include the following script in your page: (and the stylesheet for some basic styling) and set an attribute ”default_value” on the input control with the value you want to display as overlay:

<input name=”foo” default_value=”overlay” type=”text”/>

And that’s pretty much it. If you update the document with new input control via javascript you will need to call updateInputOverlays() to update them though.

– Möller



Fyll i dina uppgifter nedan eller klicka på en ikon för att logga in: Logo

Du kommenterar med ditt Logga ut /  Ändra )


Du kommenterar med ditt Google+-konto. Logga ut /  Ändra )


Du kommenterar med ditt Twitter-konto. Logga ut /  Ändra )


Du kommenterar med ditt Facebook-konto. Logga ut /  Ändra )

Ansluter till %s

%d bloggare gillar detta: