Jump to content

Search the Community

Showing results for tags 'java script'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location


Interests

Found 10 results

  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>
  2. Can someone help me with a JS that will add a record with parameters to a table by clicking on a row of a tabular report? Would also work if it was a link added to each row. I'm trying to allow users to quickly create a list of favorites from a large database of docs. Details: Click on tab report row (or link) generated from "Docs" table > add new record to "Favorites" table setting Favorites.DocID to Docs.DocID AND @UserID to Favorites.UserID Thank you!! marc
  3. Hi, I'm trying to hide two columns in a tabular report if one of the fields has null values or is empty. I've tried the following Java Script several different ways, but can't seem to get it to work correctly. A submission form feeds this tabular report, and if the user doesn't enter values in the 'Qty' field, it should be hidden on the tabular report. <script> var stl='none'; var tbl = document.getElementsByTagName('table')[0]; var rows = tbl.getElementsByTagName('tr'); var EmpQty = ("[@field:Employee_Productivity_Qty]").length; if (EmpQty<0) { for (var row=1; row<rows.length;row++) { var cels = rows[row].getElementsByTagName('td'); cels[7].style.display=stl; cels[8].style.display=stl; } var heads= tbl.getElementsByTagName('th'); heads[7].style.display=stl; heads[8].style.display=stl; } </script> Thank you!
  4. In a update form, can i block user update certain field based of other values.like if there is "Document" and "Documents remarks", where user will upload file in "Document" and will put remarks in "Documents remarks" (Approved/ Rejected/ On Hold).I want to disable the editing option of "Document" on the basis of"Document remarks" . If "Document remarks" is approved then user cant update the "Document" Filed .In form i already made rules on "Document remarks" on basis of different value. It is not giving access to create a new rule. Is it possible or any way arround?
  5. I'm looking to display the the record count for a tbale in the header of a chart datapage and I'm not sure how to accomplish this. I have a table called tblEventRegistration and I would like show the query results of: 'SELECT Count(tblEventRegistration.ERID) AS TotalReg FROM tblEventRegistration;' . I was told that I could be done with a java script but I'm not sure how to access the data. Any help would be greatly appreciated.
  6. Hi, i have several input fields (Date/time) for user to need to insert their birth date. As the popup calendar it is a little bit uncomfortable to go many years ago, some of them wants to insert the dates manually, so i need to create a mask with predefine dd/mm/yyyy format to able the users to just insert the numbers and then the field could have the right format to can be inserted. Any idea? Thanks!
  7. I have a form, and I would like to submit the form by clicking a link instead of a submit button, and then having the form redirect to a single record update page while passing a parameter (the unique ID generated from the form), Any resources I could refer to be able to do that? Thank you for your help.
  8. Hello, I am trying to edit the Java Script in the footer of a Submission Form to allow me to Concatenate Two separate Date/Time Fields. The first is a "Trip Start Date and Time" and the Second is a "Trip End Date and Time" as shown in the following attachment: The issue I'm having is that I can make one operate correctly when alone in the footer but not when I add the second. It was suggested to me that the issue may lie in the "getElementById" function and having it "defined twice" and that one may be overwriting the other. Attached are two snips of the code I have in the footer: , I need to accomplish this in a Gallery Report Data Page as well. Any thoughts? Thank you, Tyler
  9. I need a way to add a remember me check box that will allow my users browser to remember there authentication. i know there are several ways to do this. however i'm not able to get the caspio authentication to receive this information. i believe the easiest way to do this would be with cookies however i'm at a loss and i need to get it done. Could anyone please advise me on the most effective way to do this along with the script and how to implement it. thank you.
  10. I am working with Submissions, Single Record Update and Details pages, where I understand the following script (and it's variants) should work. However the behaviour is not consistent. A) The following works just fine (helps ensure unique "Tag Name" within same "Project": <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var TagName = document.getElementById("InsertRecordTagName").value; var ProjectID = document.getElementById("InsertRecordProjectID").value; var ChkUnique = TagName + ProjectID; document.getElementById("InsertRecordChkUnique").value = ChkUnique; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> However the following, in another page but with pretty much the same logic (need to ensure unique PermittedUserEmail for given project), doesn't work (there is no value inserted into the ChkUnique field in the database, unlike the first case) <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var PermittedUserEmail = document.getElementById("InsertRecordPermittedUserEmail").value; var ProjectID = document.getElementById("InsertRecordProjectID").value; var ChkUnique = PermittedUserEmail + ProjectID; document.getElementById("InsertRecordChkUnique").value = ChkUnique; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> C) Also, the following, though a different context and logic, doesn't work either: (This is a Details page so I understand InsertRecord needs to change to EditRecord) <script> function chk_date(){ var startdate = document.getElementById("EditRecordStartDate").value; var enddate = document.getElementById("EditRecordEndDate").value; if ( Date.parse(startdate) < Date.parse(enddate) ) { alert('Start Date must be less or equal to than End Date'); return false; } } document.getElementById("caspioform").onsubmit=chk_date; </script>
×
×
  • Create New...