Forum Moderators: open
var f = this.getField("departure")
var g = this.getField("arrival")
var h = this.getField("nohotel")
event.value = f.value - g.value
if (event.value < 0){
app.alert("Check Out date must be AFTER Check In date")
}
DO i have to put at the end of this something like.... if (document.form1.nothotel.checked == true) {
? I want it to set a value of zero here
}
[webmasterworld.com...]
"In use, this operator takes the form expression1? expression2 : expression 3. Expression1 must be a Boolean - that means it must evaluate to either True or False. If expression1 is True, the ternary operator will return expression2 as a result. If expression1 is False, then the ternary operator will return expression3 as a result. "
Does that help?