Rev | Line | |
---|
[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" |
---|
| 11 | || input.value == "Write a description for this session here.")) |
---|
| 12 | { |
---|
| 13 | input.value = ""; |
---|
| 14 | input.style.color = "black"; |
---|
| 15 | input.clicked = true; |
---|
| 16 | } |
---|
| 17 | } |
---|
| 18 | |
---|
| 19 | function handleBlur(input) |
---|
| 20 | { |
---|
| 21 | if (input.value == "") |
---|
| 22 | { |
---|
| 23 | input.style.color = "#555"; |
---|
| 24 | input.clicked = null; |
---|
| 25 | if (input.id == "surveyTitle") |
---|
| 26 | { |
---|
| 27 | input.value = "Untitled Survey"; |
---|
| 28 | } |
---|
| 29 | else if (input.id == "surveyDescription") |
---|
| 30 | { |
---|
| 31 | input.value = "Write a helpful description for this survey here."; |
---|
| 32 | } |
---|
| 33 | else if (input.id == "sessionTitle") |
---|
| 34 | { |
---|
| 35 | input.value = "Untitled Session"; |
---|
| 36 | } |
---|
| 37 | else if (input.id == "sessionDescription") |
---|
| 38 | { |
---|
| 39 | input.value = "Write a description for this session here."; |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | } |
---|
| 43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.