source: Dev/branches/jos-branch/js/creation.js @ 122

Last change on this file since 122 was 66, checked in by fpvanagthoven, 14 years ago

ApplicationCreationTool?.php and SessionCreationTool? (now can add survey to pipeline)

File size: 2.4 KB
Line 
1function 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            || input.value == "Untitled Application"
13            || input.value == "Write a description for this application here."))
14            {
15        input.value = "";
16        input.style.color = "black";   
17        input.clicked = true;
18    }
19}
20                                                                                                                                                                                                                                                                                                                                                                                   
21function 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        }
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        }
51           
52    }                           
53}
Note: See TracBrowser for help on using the repository browser.