PageSourceSearch

https://www.briggstreeinc.com/scripts/input-clear.js

js briggstreeinc.com collected 2026-10-08 19:34:35 UTC 1,240 bytes, 51 lines download raw bytes

1//Clear Input Field When Focused
2function init() {
3 var inputs = document.getElementsByTagName('input');
4 var comments = document.getElementsByTagName('textarea');
5 for(var i=0; i < inputs.length; i++) {
6  if (inputs[i].type == 'text') {
7   inputs[i].setAttribute('rel',inputs[i].defaultValue);
8   inputs[i].onfocus = function() {
9    if (this.value == this.getAttribute('rel')) {
10     this.value = '';
11    } else {
12     return false;
13    }
14   }
15   inputs[i].onblur = function() {
16    if(this.value=='') { 
17     this.value = this.getAttribute('rel');
18    } else {
19     return false;
20    }
21   }
22   inputs[i].ondblclick = function() {
23    this.value = this.getAttribute('rel')
24   }
25  }
26 }
27  for(var j=0; j < comments.length; j++) {
28   comments[j].setAttribute('rel',comments[j].defaultValue);
29   comments[j].onfocus = function() {
30    if (this.value == this.getAttribute('rel')) {
31     this.value = '';
32    } else {
33     return false;
34    }
35   }
36   comments[j].onblur = function() {
37    if(this.value=='') { 
38     this.value = this.getAttribute('rel');
39    } else {
40     return false;
41    }
42   }
43   comments[j].ondblclick = function() {
44    this.value = this.getAttribute('rel')
45   }
46 }
47}
48 
49if(document.childNodes) {
50 	window.onload = init;
51}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.