Jump to content

Xavier

Members
  • Content Count

    1
  • Joined

  • Last visited

About Xavier

  • Rank
    Newbie

Recent Profile Visitors

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

  1. I've been trying to add a month to a date for the use of recurring payments. The code I have to put in the HTML block I have placed below. And thats a code i got from someone else on this website but it doesn't not work. Please help. [@field:New_Date*] <SCRIPT LANGUAGE="JavaScript"> function setDate() { var New_Date = "first"; var Current_Date_1 = "second"; New_Date = "InsertRecord" + New_Date; Current_Date_1 = "InsertRecord" + Current_Date_1; var New_Date = document.getElementById(New_Date ).value; var New_Date = new Date(Date.parse(New_Date)); var result_Date = new Date (first_Date.setMonth(first_Date.getMonth()+1)); var d_month = result_Date.getMonth() + 1; if (d_month<10) {d_month = "0" + d_month;} var d_day = result_Date.getDate(); if (d_day<10) {d_day = "0" + d_day;} var d_year = result_Date.getFullYear(); var str_date = d_month + "/" + d_day + "/" + d_year; document.getElementById(Current_Date_1[@field:Current_Date_1*] ).value = str_date; } document.getElementById("caspioform").onsubmit=setDate; </SCRIPT>
×
×
  • Create New...