Jump to content

HongTaiLang

Caspio Guru
  • Posts

    131
  • Joined

  • Last visited

  • Days Won

    1

Community Answers

  1. HongTaiLang's post in Extract Day Of The Week From Date was marked as the answer   
    Try the following code to get the day automatically if the date is selected from a submission form
    =======
    Remember to change the element id "InsertRecordFieldNameofDate" and "InsertRecordFieldNameofDayName"
    <script> function myFunction() { var sub_date = document.getElementById("InsertRecordFieldNameofDate").value; var d = new Date(sub_date); var weekday=new Array(7); weekday[0]="Sunday"; weekday[1]="Monday"; weekday[2]="Tuesday"; weekday[3]="Wednesday"; weekday[4]="Thursday"; weekday[5]="Friday"; weekday[6]="Saturday"; var x = weekday[d.getDay()]; document.getElementById("InsertRecordFieldNameofDayName").value = x; } document.getElementById("InsertRecordFieldNameofDate").addEventListener("change", myFunction); </script>
  2. HongTaiLang's post in How To Make A Page Open At The Bottom After Loading? was marked as the answer   
    You can make the link to a specific position by using An anchor URL --points to an anchor within a page (like href="#top")
     
    1. Add Header/Footer in the Configure Results Page Fields 
    2. Add <div> tags around Header and Footer
    For example: in Header      <div id="anchorname">
                          in Footer       </div>
    3. Add JS code to point the Caspio page when results page is loaded. 
    in Footer, after </div> tags
    <script> window.onload= function() { location.href="[@cbHostURL]#anchorname"; } </script> Please note the anchorname is the same as the id. 
×
×
  • Create New...