Jump to content

Ioannis

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

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

Ioannis's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Alison Thanks for your reply Caspio has uploaded the app into my account. In the calendar form the "add new" button is missing even with the following code in the footer: <script> document.addEventListener('DataPageReady', function (event) { // Set links for navigation bar $('a[data-cb-name="JumpToFirst"] > img').attr('src', '[@app:URL_2]'); $('a[data-cb-name="JumpToPrev"] > img').attr('src', '[@app:URL_5]'); $('a[data-cb-name="JumpToNext"] > img').attr('src', '[@app:URL_4]'); $('a[data-cb-name="JumpToLast"] > img').attr('src', '[@app:URL_3]'); // Add link to New Appointment page var month = ""; var allSpanTags = document.getElementsByTagName("li"); for (i = 0; i < allSpanTags.length; i++) { if (allSpanTags[i].className == "cbResultSetCalendarCaption") { month = allSpanTags[i].innerText; } } month = month.replace(/January /gi, "1/Day/"); month = month.replace(/February /gi, "2/Day/"); month = month.replace(/March /gi, "3/Day/"); month = month.replace(/April /gi, "4/Day/"); month = month.replace(/May /gi, "5/Day/"); month = month.replace(/June /gi, "6/Day/"); month = month.replace(/July /gi, "7/Day/"); month = month.replace(/August /gi, "8/Day/"); month = month.replace(/September /gi, "9/Day/"); month = month.replace(/October /gi, "10/Day/"); month = month.replace(/November /gi, "11/Day/"); month = month.replace(/December /gi, "12/Day/"); var allHTMLTags = new Array(); // Create Array of All HTML Tags var allHTMLTags = document.getElementsByTagName("div"); // Loop through all tags using a for loop for (i = 0; i < allHTMLTags.length; i++) { // Get all tags with the specified class name. if (allHTMLTags[i].className == "cbResultSetCalendarField") { var transfer = month.replace(/Day/gi, allHTMLTags[i].innerHTML); // Check if date is not past date var sysDate = '[@cbTimestamp*]'; var dateToday = new Date(sysDate); var dateCalendar = new Date(transfer); if (dateCalendar >= dateToday) { // Begin Add New Link Section allHTMLTags[i].innerHTML = '<a class="truncated float-left" title="New Appointment" style="text-decoration:none;" href="./new-appointment.html?Date=' + transfer + '"><i class="fa fa-calendar-plus fa-lg"></i></a>' + allHTMLTags[i].innerHTML; // End of Add New Link Section } } } }); </script> I have also tried the directions of the article and I pasted the following code into the footer of calendar form: <script> document.addEventListener('DataPageReady', function(event) { var month = ""; var allSpanTags = document.getElementsByTagName("span"); for (i=0; i<allSpanTags.length; i++) { if (allSpanTags[i].className == "cbResultSetCalendarCaption"){ month = allSpanTags[i].innerHTML; } } month = month.replace(/January /gi,"1/Day/"); month = month.replace(/February /gi,"2/Day/"); month = month.replace(/March /gi,"3/Day/"); month = month.replace(/April /gi,"4/Day/"); month = month.replace(/May /gi,"5/Day/"); month = month.replace(/June /gi,"6/Day/"); month = month.replace(/July /gi,"7/Day/"); month = month.replace(/August /gi,"8/Day/"); month = month.replace(/September /gi,"9/Day/"); month = month.replace(/October /gi,"10/Day/"); month = month.replace(/November /gi,"11/Day/"); month = month.replace(/December /gi,"12/Day/"); var allHTMLTags = new Array(); //Create Array of All HTML Tags var allHTMLTags = document.getElementsByTagName("div"); //Loop through all tags using a for loop for (i=0; i<allHTMLTags.length; i++) { //Get all tags with the specified class name. if (allHTMLTags[i].className == "cbResultSetCalendarField") { var transfer = month.replace(/Day/gi,allHTMLTags[i].innerHTML); /*Begin Add New Link Section*/ allHTMLTags[i].innerHTML = allHTMLTags[i].innerHTML +'<br><a style="text-decoration:none;" href="https://www.breastmedicare.eu/test.html?Date='+transfer+'">Add New</a>'; /*End of Add New Link Section*/ } } }); </script> where https://www.breastmedicare.eu/test.html is the URL of the submission form. The "add new" button is there but it doesn't transfer the date to the submission form! Is there something I have done wrong?
  2. In Caspio's template "Appointment Scheduler" there is a calendar (https://apps.caspio.com/demo18/asr/admin/schedule-patients.html) with a "new appointment" button. Is there any idea how could I create a similar button in a calendar?
×
×
  • Create New...