Created
June 26, 2012 18:00
-
-
Save computercarguy/2997528 to your computer and use it in GitHub Desktop.
PHP code to put a day select box and a year text box into an HTML form.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function YearInput(){ | |
| $HTMLCode = "<input type=\"text\" id=\"Year\" name=\"Year\" size=\"5\" maxlength=\"4\" value=\"Year\" onfocus=\"Focus('Year','Year')\" "; | |
| $HTMLCode .= "onkeyup=\"NoChrs('Year')\" onblur=\"Blur('Year','Year');\" /></td>".Chr(13); | |
| return $HTMLCode; | |
| } | |
| function DaySelect(){ | |
| $HTMLCode = "<select name=\"day\" id=\"day\">".Chr(13); | |
| for ($i=1;$i<32;$i++){ | |
| $HTMLCode .= "<option value=\"".$i."\">".$i."</option>".Chr(13); | |
| } | |
| $HTMLCode .= "</select>".Chr(13); | |
| return $HTMLCode; | |
| } | |
| // To be used with the Focus() and Blur() JavaScript functions found at the repository: git://gist.github.com/2997403.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment