Jump to content

Accountability

Caspio Ninja
  • Content Count

    77
  • Joined

  • Last visited

About Accountability

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Really appreciate you making the effort. Unfortunately didn't hide either one. This is an HTML block in a report results page. Thanks again for helping...
  2. First of all thanks for responding. [@field:Employee_Document_Link] is a text255 and [@field:Employee_Document_Upload] is a file.
  3. Contained in this HTML block are two options:Google Doc<br />&nbsp; &nbsp;<a href="[@field:Employee_Document_Link]" target="_blank"><img alt="File Quick View" src="http://account-ability.net/webapps/hca/images/Entypo_e731(1)_32.png" style="width: 32px; height: 32px;" /></a><br /><br />Uploaded Doc<br />&nbsp; &nbsp; <a href="https://c0axa147.caspio.com/dp/76292000e18ad3e841834930b209?Employee_Document_ID=[@field:Employee_Document_ID]" target="_blank"><img alt="File Quick View" src="http://account-ability.net/webapps/hca/images/Entypo_e731(1)_32.png" style="width: 32px; height: 32px;" /></a>The user clicks on either of the document icons. What I am trying to achieve is for the "Google Doc" icon to show only when the [@field:Employee_Document_Link] is not empty the and "Uploaded Doc" icon to only show when the [@field:Employee_Document_Upload] is not empty. Would very much appreciate any help in this.
  4. Took me a while to figure out. Here is what worked for me if anyone else needs it. <script> var now = new Date(); var expiration = new Date("[@field:Employee_Doc_Date_Plus_Renew*]"); if(now > expiration) // today is after expiration document.write("<IMG ALIGN='center' "+ "SRC='https://My URL/Expired_76x50.png'> "); </script> You will need to replace My URL with the actual URL where your image resides as well as your actual @field references.
  5. I have a field [@field:Expiration_Date] . I would like to display a small 75 x 50 graphic "Expired" using JavaScript in an Html Block only if Today() is greater than the expiration date. This is a results page where rules are not available. I am pretty sure this can be done with an <img> tag, JavaScript and an Html Block. I just don't know the proper syntax. Would appreciate any help ? Thanks You ! Unsuccessfully Tried This: <script> expired = [@field:Employee_Doc_Date_Plus_Renew*].value; today=[@field:Date_Time_Stamp*].value; if (expired < today) { <img alt="" src="https://www.mysite.net/Expired_76x50.png" style="width: 76px; height: 50px;" /> ; } </script>
  6. Hello Douvega, Many Many Thanks. You are incredible, worked perfectly. THANK YOU, THANK YOU, THANK YOU...
  7. Hello Vitalikssssss, Thanks again for responding. Unfortunately, this does not work. It is really strange because it is such a simple script and with the limited knowledge I have in regards to Javascript, it appears to be flawless. I am really scratching my head on this one. Thanks again.
  8. Also unsuccessfully tried this: <div id="datefix"> <script> function DateCheck() { var dateout = document.getElementById('InsertRecordDefined_Time_Out').value; var datein = document.getElementById('InsertRecordDefined_Time_In').value; var zero = "00/00/0000" if (dateout <= datein) alert("Please enter a date and time OUT after date and time IN "); document.getElementById("InsertRecordDefined_Time_Out").value = "zero"; return false; } document.getElementById('InsertRecordDefined_Time_Out').onChange = DateCheck; </script> </div> Any suggestions would be greatly appreciated. Thanks in Advance. !
  9. Vitalikssssss Thank you so much for taking the time to help. The "s" was the problem. Thanks again !
  10. Please see the attached Screen Shot. This is the same working code in: https://forums.caspio.com/topic/7022-time-sheet-date-and-time-in-and-out/ Only changes made were, Dropdowns were changed to Cascading Dropdowns. The following is not working. Anything obvious ? Please advise... Thanks for helping <div id="con1"> <script> function concatenate1() { var One = document.getElementById("cbParamVirtual1").value; var Two = document.getElementByName("cbParamVirtual2")[0].value; var Three = document.getElementByName("cbParamVirtual3")[0].value; var Four = document.getElementById("cbParamVirtual4").value; var Five = document.getElementByName("cbParamVirtual5")[0].value; var link = One + " " + Two +":" + Three + ":"+Four + " "+Five; document.getElementById("InsertRecordDefined_Time_In").value = link; } document.getElementByName("cbParamVirtual5")[0].onchange = concatenate1; document.getElementById("cbParamVirtual1").onchange = concatenate1; document.getElementByName("cbParamVirtual2")[0].onchange = concatenate1; document.getElementById("cbParamVirtual3").onchange = concatenate1; document.getElementByName("cbParamVirtual4")[0].onchange = concatenate1; </script> </div> <div id="con2"> <script> function concatenate2() { var Six = document.getElementById("cbParamVirtual6").value; var Seven = document.getElementByByName("cbParamVirtual7")[0].value; var Eight = document.getElementByByName("cbParamVirtual8")[0].value; var Nine = document.getElementById("cbParamVirtual9").value; var Ten = document.getElementByByName("cbParamVirtual10")[0].value; var linkout = Six + " " + Seven +":" + Eight + ":"+Nine + " "+Ten; document.getElementById("InsertRecordDefined_Time_Out").value = linkout; } document.getElementByName("cbParamVirtual10")[0].onchange = concatenate2; document.getElementById("cbParamVirtual6").onchange = concatenate2; document.getElementByName("cbParamVirtual7")[0].onchange = concatenate2; document.getElementByName("cbParamVirtual8")[0].onchange = concatenate2; document.getElementById("cbParamVirtual9").onchange = concatenate2; </script> </div>
  11. Thank you so much for responding. Unfortunately it didn't work. I don't know if this makes a difference but there are two other working scripts right above it https://forums.caspio.com/topic/7022-time-sheet-date-and-time-in-and-out/ Any more advise would be greatly appreciated.
  12. Please See Above attachment. In attempting to integrate drop-down values so I could use both the working code (Above) and the drop-down. I unsuccessfully tried the following. If I can find a way for this code to work I will apply the same for every Work Schedule in the drop-down). Any advise would be appreciated. Code Snippet var shift = document.getElementById("Defined_Work_Schedule").value; var One = document.getElementById("cbParamVirtual1").value; var Two = document.getElementById("cbParamVirtual2").value; if (shift == "7:00 AM to 7:00 PM") var Two="07"; var Three = document.getElementById("cbParamVirtual3").value; if (shift == "7:00 AM to 7:00 PM") var Three="00"; etc.....
  13. I am trying to make sure the time in entered is less than the time out entered. I was determined to figure this out on my own but just can get go any further without help. Here is my code. Since Defined_Date_Out is required, I thought replacing the users erroneous entry with null would prevent the submission from being initiated. Thanks for any advise ? <div id="datefix"> <script> function DateCheck() { var dateout = document.getElementById('Defined_Time_Out').value; var datein = document.getElementById('Defined_Time_In').value; if (dateout <= datein) alert("Please enter a date and time OUT after date and time IN "); document.getElementById("InsertRecordDefined_Time_Out").value = null; } document.getElementById('InsertRecordDefined_Time_Out').onChange = DateCheck; </script> </div>
  14. For future reference here is the JS for both date and time In and date and time Out. I do have one question, is there a way to prevent the submission if someone chooses an OUT date and time which is less than the IN date and time. Just a little precaution. I was thinking if we could put an if statement which is in essence > Have Date Out required : IF Defined_Date_Out is Less than Defined_Date_In > reset Defined_Date_Out to Blank. Since it is required it would stop the submission. I am not sure of the syntax but I think the logic would work. As always thanks for any help. I have done a lot of testing and the following seems to work every time. <div id="con1"> <script> function concatenate1() { var One = document.getElementById("cbParamVirtual1").value; var Two = document.getElementById("cbParamVirtual2").value; var Three = document.getElementById("cbParamVirtual3").value; var Four = document.getElementById("cbParamVirtual4").value; var Five = document.getElementById("cbParamVirtual5").value; var link = One + " " + Two +":" + Three + ":"+Four + " "+Five; document.getElementById("InsertRecordDefined_Time_In").value = link; } document.getElementById("cbParamVirtual5").onchange = concatenate1; document.getElementById("cbParamVirtual1").onchange = concatenate1; document.getElementById("cbParamVirtual2").onchange = concatenate1; document.getElementById("cbParamVirtual3").onchange = concatenate1; document.getElementById("cbParamVirtual4").onchange = concatenate1; </script> </div> <div id="con2"> <script> function concatenate2() { var Six = document.getElementById("cbParamVirtual6").value; var Seven = document.getElementById("cbParamVirtual7").value; var Eight = document.getElementById("cbParamVirtual8").value; var Nine = document.getElementById("cbParamVirtual9").value; var Ten = document.getElementById("cbParamVirtual10").value; var linkout = Six + " " + Seven +":" + Eight + ":"+Nine + " "+Ten; document.getElementById("InsertRecordDefined_Time_Out").value = linkout; } document.getElementById("cbParamVirtual10").onchange = concatenate2; document.getElementById("cbParamVirtual6").onchange = concatenate2; document.getElementById("cbParamVirtual7").onchange = concatenate2; document.getElementById("cbParamVirtual8").onchange = concatenate2; document.getElementById("cbParamVirtual9").onchange = concatenate2; </script> </div>
  15. Please see attached Screenshot. Note: this is only the IN date and time. Once this all works as desired, I will do the exact same thing for Out time and date. Ok "A" works great. I can change any of the drop-downs and the "Defined_Time_In" is properly populated in real time (onchange). Now I would like to be able to use the "B" "Defined Work Schedule" Drop-down and be able for that to populate the same fields. In other words, would like to incorporate "B" the "Defined Work Schedule" Drop-down to auto populate Virtual2(Hour), Virtual3(Minutes), Virtual4(Seconds) and Virtual5(AM/PM). If this is possible and the "Defined Work Schedule" Dropdown is able to populate V2-V5, still need for the user to change any of these individually with their prospective dropdowns. In other words still have the functionality of the JScript before introducing the new "Defined Work Schedule" Dropdown. Thanks You
×
×
  • Create New...