joscetre

Members
  • Content count

    16
  • Joined

  • Last visited

  1. I have a tabular report with a details page. The details page has a script that runs when the form is submitted via Caspio's Update button (using 'onsubmit'). The details page also includes Caspio's Back button. The problem I have is that the script runs when either the Update button OR the Back button is clicked. I would have thought the 'onsubmit' script should only fire when the Update button is pressed. Am I missing something? Here is the code: function CheckSubmit() { alert("running the OnSubmit script!"); } document.getElementById("caspioform").onsubmit=CheckSubmit;
  2. I need to run some script when a record is deleted from a Details Page by the user. So I have hidden the regular Delete button and substituted the code below: <button onclick="DeleteFunction()">Delete</button> <script> function DeleteFunction() { document.getElementById("Mod0DeleteRecord").click(); } </script> However, when the substituted button is clicked, the confirmation box opens only momentarily, then closes by itself without actually deleting the record! I believe this used to work properly, so something may have changed on the Caspio end. (Note that if I unhide the regular delete button and click on that, it works fine.) Does anyone have experience of this happening?
  3. Is it possible to use cookies to remember the identity of a user to streamline the log-in process? Using Javascript I have been able to modify the Caspio appkey cookie to append the user information together with an expiration date. However, when the user logs off and starts a new session, it appears that a new Caspio cookie over-writes any existing cookie on the user's computer. Is there a way to retain the user's identity in a cookie? Subsequent edit: I have resolved the problem. Just need to be very precise about the cookie formats and handling of different browsers. You may delete this post.
  4. OK, that's a shame. Thanks for addressing my query.
  5. I have a Report DataPage which includes a count of all rows having a particular attribute. Caspio correctly displays and stores this aggregate value as "Aggregate 1". I would now like to show a message when this value exceeds a set limit. I have tried to set a variable to the aggregate field, but with no sucess: var v_total = document.getElementById("Aggregate_1")Is there a way to capture an aggregate value without re-coding the full aggregation in JS? :?:
  6. How to Import Null Date Values?

    Yes, that worked! And I thought I had tried everything. Thanks for your help
  7. I have an API call which sends data to Caspio. One of the fields sent is a date, but it is an optional field, so is sometimes null. The API call rejects a null value for a date field. If I send a zero or blank value the date shows in Caspio as 01/01/1900. Is there a way to avoid this?
  8. Passing Paramaters Containing Amperand (&)

    It works! Thank you so much Bahar . I would suggest you put this solution in your help documentation for other users.
  9. Passing Paramaters Containing Amperand (&)

    Thanks, Bahar, but actually it doesn't work! Please see my last post and advise accordingly. Thanks
  10. Passing Paramaters Containing Amperand (&)

    Jason & Bahar, thanks for the correction, not sure how I missed that. But unfortunately it's still not quite right. I'm trying to pass the parameter value "Trevor & Justine Joscelyne". The link does not add the parameter value, but looks like this: "http://b6.caspio.com/dp.asp?AppKey=ddae2000c2f0bb5fd8424eba8ca5&Mailing_Names=" However, I tried changing the position of the second single quote in the script like this: <script> document.write("[url="http://b6.caspio.com/dp.asp?AppKey=ddae2000c2f0bb5fd8424eba8ca5&Mailing_Names="]link[/url]") ; </script>Which results in this link, which looks more hopeful:"http://b6.caspio.com/dp.asp?AppKey=ddae2000c2f0bb5fd8424eba8ca5&Mailing_Names=Trevor%20%26amp%3B%20Justine%20Joscelyne" But it's still not being recognized by the datapage that's receiving it. Question - is that the way the link should look, or is something else wrong?
  11. Passing Paramaters Containing Amperand (&)

    Thanks, Bahar. It looks like it should work, but the code you quote does not seem to pass the parameter. Here is my specific version: <script> document.write("[url="http://b6.caspio.com/dp.asp?AppKey=ddae2000c2f0bb5fd8424eba8ca5?Mailing_Names="]link[/url]") ; </script>I know that [@field:Mailing_Names] contains the correct data. When I right-click on the link to view its properties, it only shows as far as Mailing_Names=, and does not include the value. I'm wondering in the format it not quite correct. Any advice? Thanks Trevor.
  12. I have a list of names which include an ampersand (eg: "Jack & Jill"), which I am using for users to identify themselves as part of their logon. I want to be able to pass the field value as a parameter within a string, but it only passes the part of the field before the ampersand (eg: "Jack"). Is there a way to pass a parameter that contains ampersands within the field values?