Changeset 11 for Dev/trunk/classes
- Timestamp:
- 07/12/11 19:01:58 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/classes/SurveyCreationTool.php
r10 r11 10 10 11 11 public function __construct() { 12 SurveyCreationTool::javascript(); 13 ?> 14 <div id="surveyCreation"><form action="submitsurvey.php" method="post"> 15 <?php 16 SurveyCreationTool::titleBox(); 17 SurveyCreationTool::descriptionBox(); 18 SurveyCreationTool::questionCreationForm(); 19 SurveyCreationTool::submitButton(); 20 ?></form></div> 21 <?php 22 } 23 24 private static function javascript() { 25 ?> 26 <script type="text/javascript"> 27 28 function handleFocus(input) 29 { 30 if (input.clicked == null) 31 { 32 input.value = ""; 33 input.style.color = "black"; 34 input.clicked = true; 35 } 36 } 37 38 function handleBlur(input) 39 { 40 if (input.value == "") 41 { 42 input.style.color = "gray"; 43 input.value = "Untitled Survey"; 44 input.clicked = null; 45 } 46 } 47 48 </script> 49 <?php 50 } 51 52 private static function titleBox() { 53 ?> 54 <input type="text" name="surveyTitle" value="Untitled Survey" id="surveyTitle" size="30" onblur="handleBlur(this)" onfocus="handleFocus(this)" /> 55 <?php 56 } 57 58 private static function descriptionBox() { 59 ?> 60 <textarea id="surveyDescription" rows="3" cols="80" name="surveyDescription">Write a helpful description for this survey here.</textarea> 61 <?php 62 } 63 64 private static function questionCreationForm() { 65 66 SurveyCreationTool::addQuestionButton(); 67 } 68 69 private static function addQuestionButton() { 12 70 13 71 } 14 72 15 private static function titleBox() { 16 //textbox 73 private static function submitbutton() { 74 ?> 75 <input type="submit" name="submitSurvey" 76 value="Submit Survey!" id="submitSurvey"/> 77 <?php 17 78 } 18 19 private static function descriptionBox()20 {21 //textarea22 }23 24 private static function addQuestionButton()25 {26 27 }28 29 private static function questionCreationForm()30 {31 32 }33 79 34 80 } 35 36 81 ?>
Note: See TracChangeset
for help on using the changeset viewer.