Jump to content

SunLover

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. Hi MayMusic, thanks for taking the time to help me. I hadn't been able to work on this since I posted the question. I did tried tonight though and it doesn't seem to work. I am not sure I am doing something wrong :-( this is what i have in the footer and I disabled html editor. Do you think you can take a look for me again? thanks a lot! <script> document.getElementById('Submit').onmouseover = function (){ var d = new Date() var dd = d.getDate()+1; var mm = d.getMonth()+1;//January is 0! var yyyy = d.getFullYear(); if(dd<10){dd='0'+dd} if(mm<10){mm='0'+mm} var tomorow = mm+'/'+dd+'/'+yyyy; var time = d.getHours(); var min = d.getMinutes(); var date=document.getElementById('Date_of_Inspection').value; var myDate = new Date(Date.parse(date)); if(myDate.getDay() == 6 || myDate.getDay() == 0) { alert('Weekend! You need to pick week days date'); return false; } else if (date == tomorow && time >= 17) { alert("Too late to schedule for tomorrow"); return false; } } </script>
  2. I am creating a datapage where my clients can make request for the time and date of a specific inspection. In order to be able to coordinate the inspectors I have to limit the time that the requests are made, therefore I need to create a condition that does the following: to process the request online then the request has to be made at the latest the prior business day before by 5:00 pm (local time) For example today is Tuesday at 6:00 pm local time, therefore the earliest inspection available is for Thursday since is already after 5:00 pm to request for tomorrow. I am intermediate user that have created a significant application but I don't have programming knowledge, so any help is really appreciated.
×
×
  • Create New...