I am attempting to validate that a date entered in child form falls within a week ending date in a parent form. My alert works for the second part of the evaluation but not the first part. In other words, I get the alert if the date is greater than...
I am looking for a way to throw a confirm to save changes when a user attempts to close a browser window by hitting the X. I don't think I can use the unload event because that triggers when users navigate away as well as close the window.
Any ideas?
Duh
I neglected to subsitute
fromTime = document.forms[0].twField0.value
toTime = document.forms[0].twField4.value
for your values
fromTime = "12:00 PM"
toTime = "12:00 AM"
Thanks for your patience..
This is what I get....
From Time: 11:59 PM To Time: 03:00 AM Millisecs:-75540000 Shift cannot span Midnight
From Time: 01:15 AM To Time: 03:15 PM Millisecs:50400000 This block of time is longer than twelve hours! Choosing OK will allow you to continue.
From Time: 03:55 PM To Time: 12:00 AM...
Tried it...it returns a box that shows the date and time first, click ok and and then another alert OK. Problem is it appears to OK everything now. good and bad entries alike.:-(
Did what you said but still throws the alert. Here is the code. Can you see my problem.
I appreciate any light you can shed.
function twValidateRecord(intThisRecord) {
if (window.document.forms[0].twField0.value.length==0) {alert("Date cannot be empty"); return false;};
if...
mwolf00
your code is working for the most part however,I have a small problem. I need users to be able to select 12:00 AM as an end time to the shift. right now it throws the alert.
I attempted to modify your if statement to allow 12:00 AM as an end time but it won't work for me
if ((diff <...
jemminger
that is a nice bit of coding there but it will still allow for a start time to be say 11:30 AM and the end time to be 12:30 AM. This would also span midnight but would not be caught.
This is a time sheet application and I have to cover all my bases or the users will surely mess it up.
I have a Javascript validation routine that runs on a Domino web form. I need two more validations done that are giving me trouble. Here is the situation
Start Time is entered in this field ="twField0"
End Time is entered in this field = "twField4"
Times are entered in...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.