[64] | 1 | function handleFocus(input) |
---|
| 2 | { |
---|
| 3 | /* this is such ugly code it makes me sad */ |
---|
| 4 | /* because it is hard coded. */ |
---|
| 5 | if (input.clicked == null && |
---|
| 6 | (input.value == "Untitled Survey" |
---|
| 7 | || input.value == "Write a helpful description for this survey here." |
---|
| 8 | || input.value == "Write a question description here." |
---|
| 9 | || input.value == "Untitled Question" |
---|
| 10 | || input.value == "Untitled Session" |
---|
[66] | 11 | || input.value == "Write a description for this session here." |
---|
| 12 | || input.value == "Untitled Application" |
---|
| 13 | || input.value == "Write a description for this application here.")) |
---|
[64] | 14 | { |
---|
| 15 | input.value = ""; |
---|
| 16 | input.style.color = "black"; |
---|
| 17 | input.clicked = true; |
---|
| 18 | } |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | function handleBlur(input) |
---|
| 22 | { |
---|
| 23 | if (input.value == "") |
---|
| 24 | { |
---|
| 25 | input.style.color = "#555"; |
---|
| 26 | input.clicked = null; |
---|
| 27 | if (input.id == "surveyTitle") |
---|
| 28 | { |
---|
| 29 | input.value = "Untitled Survey"; |
---|
| 30 | } |
---|
| 31 | else if (input.id == "surveyDescription") |
---|
| 32 | { |
---|
| 33 | input.value = "Write a helpful description for this survey here."; |
---|
| 34 | } |
---|
| 35 | else if (input.id == "sessionTitle") |
---|
| 36 | { |
---|
| 37 | input.value = "Untitled Session"; |
---|
| 38 | } |
---|
| 39 | else if (input.id == "sessionDescription") |
---|
| 40 | { |
---|
| 41 | input.value = "Write a description for this session here."; |
---|
| 42 | } |
---|
[66] | 43 | else if (input.id == "applicationTitle") |
---|
| 44 | { |
---|
| 45 | input.value = "Untitled Application"; |
---|
| 46 | } |
---|
| 47 | else if (input.id == "applicationDescription") |
---|
| 48 | { |
---|
| 49 | input.value = "Write a description for this application here."; |
---|
| 50 | } |
---|
[64] | 51 | |
---|
| 52 | } |
---|
| 53 | } |
---|