Revisions
-
grampelberg revised this gist
Jan 20, 2009 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -14,6 +14,7 @@ function travelDates (elementName) { } if (blankDates) { ErrorFields[ErrorFields.length] = elementName + "s-blank"; return; } else { ClearFields[ClearFields.length] = elementName + "s-blank"; } -
grampelberg revised this gist
Jan 20, 2009 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -21,8 +21,7 @@ function travelDates (elementName) { badDates = 0; for (i=0; i < dateArray.length - 1; i++) { if (dateArray[i] > dateArray[i+1]) { badDates = 1; break; } -
grampelberg revised this gist
Jan 20, 2009 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,8 @@ function travelDates (elementName) { blankDates = 0; for (i=0; i < document.getElementsByName(elementName).length; i++) { if (document.getElementsByName(elementName)[i] == "MM/YY/YYYY" || document.getElementsByName(elementName)[i] == "") { blankDates = 1; break; } -
grampelberg renamed this gist
Jan 20, 2009 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
grampelberg revised this gist
Jan 20, 2009 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,12 @@ function travelDates (elementName) { dateArray = new Array(); for (i=0; i < document.getElementsByName(elementName).length; i++) { dateArray[i] = new Date(document.getElementsByName(elementName)[i].value); } blankDates = 0; for (i=0; i < document.getElementsByName(elementName).length; i++) { if (document.getElementsByName(elementName)[i] == "MM/YY/YYYY" || document.getElementsByName(elementName)[i] == "") { blankDates = 1; break; } -
grampelberg revised this gist
Jan 20, 2009 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,20 +1,20 @@ function travelDates (elementName) { dateArray = new Array(); for (i=0; i < document.getElementsByName(elementName).length; i++) { dateArray[i] = new Date(document.getElementsByName("date")[i].value); } blankDates = 0; for (i=0; i < document.getElementsByName(elementName).length; i++) { if (dateArray[i] == "MM/YY/YYYY" || dateArray[i] == "") { blankDates = 1; break; } } if (blankDates) { ErrorFields[ErrorFields.length] = elementName + "s-blank"; } else { ClearFields[ClearFields.length] = elementName + "s-blank"; } @@ -27,8 +27,8 @@ function travelDates () { } } if (badDates) { ErrorFields[ErrorFields.length] = elementName + "s-nomatch"; } else { ClearFields[ClearFields.length] = elementName + "s-nomatch"; } } -
grampelberg revised this gist
Jan 20, 2009 . 1 changed file with 4 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,16 +7,14 @@ function travelDates () { blankDates = 0; for (i=0; i < document.getElementsByName("date").length; i++) { if (dateArray[i] == "MM/YY/YYYY" || dateArray[i] == "") { blankDates = 1; break; } } if (blankDates) { ErrorFields[ErrorFields.length] = "dates-blank"; } else { ClearFields[ClearFields.length] = "dates-blank"; } -
There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,12 @@ function travelDates () { dateArray = new Array(); for (i=0; i < document.getElementsByName("date").length; i++) { dateArray[i] = new Date(document.getElementsByName("date")[i].value); } blankDates = 0; for (i=0; i < document.getElementsByName("date").length; i++) { if (dateArray[i] == "MM/YY/YYYY" || dateArray[i] == "") { } else { blankDates = 1; break; @@ -14,22 +19,18 @@ function travelDates () { } badDates = 0; for (i=0; i < dateArray.length - 1; i++) { if (dateArray[i] < dateArray[i+1]) { } else { badDates = 1; break; } } if (badDates) { ErrorFields[ErrorFields.length] = "dates-nomatch"; } else { ClearFields[ClearFields.length] = "dates-nomatch"; } } -
There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,24 +1,35 @@ function travelDates () { blankDates = 0; for (i=0; i < document.getElementsByName("date").length; i++) { if (document.getElementsByName("date").value == "MM/YY/YYYY" || document.getElementsByName("date").value == "") { } else { blankDates = 1; break; } if (blankDates) { ErrorFields[ErrorFields.length] = "dates-blank"; } else { ClearFields[ClearFields.length] = "dates-blank"; } } dateArray = new Array(); for (i=0; i < document.getElementsByName("date").length; i++) { dateArray[i] = new Date(document.getElementsByName("date")[i].value); } badDates = 0; for (i=0; i < dateArray.length - 1; i++) { if (dateArray[i] < dateArray[i+1]) { } else { badDates = 1; break; } } if (badDates) { ErrorFields[ErrorFields.length] = "dates-nomatch"; } else { ClearFields[ClearFields.length] = "dates-nomatch"; } } -
There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,6 @@ datesmatch = 0 datesnomatch = 0 function travelDates () { dateArray = new Array(); for (i=0; i < document.getElementsByName("date").length; i++) { @@ -7,11 +10,15 @@ function travelDates () { for (i=0; i < dateArray.length - 1; i++) { if (dateArray[i] < dateArray[i+1]) { alert ("good"); datesmatch++; } else { alert ("bad"); datesnomatch++; } } if datesmatch > datesnomatch { clearfields = badDates } else { errorfields = baddates } } -
There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ function travelDates () { dateArray = new Array(); for (i=0; i < document.getElementsByName("date").length; i++) { dateArray[i] = new Date(document.getElementsByName("date")[i].value); } for (i=0; i < dateArray.length - 1; i++) { if (dateArray[i] < dateArray[i+1]) { alert ("good"); clearFields[clearFields.length] = "badDates"; } else { alert ("bad"); errorFields[errorFields.length] = "badDates"; break; } } }