Ignore:
Timestamp:
07/12/11 19:01:58 (14 years ago)
Author:
fpvanagthoven
Message:

SurveyCreationTool?, styling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/classes/SurveyCreationTool.php

    r10 r11  
    1010
    1111    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() {
    1270       
    1371    }
    1472
    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
    1778    }
    18    
    19     private static function descriptionBox()
    20     {
    21         //textarea
    22     }
    23    
    24     private static function addQuestionButton()
    25     {
    26        
    27     }
    28    
    29     private static function questionCreationForm()
    30     {
    31        
    32     }
    3379
    3480}
    35 
    3681?>
Note: See TracChangeset for help on using the changeset viewer.