Jump to content

Search the Community

Showing results for tags 'script'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • Caspio Apps for Ukraine
    • 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 14 results

  1. Hello, I'm a newbie at Caspio and I'm have a frustrating expirience trying to figure out why my HTML script snippet in a HTML data page is not working, instead after a succesful login just renderd de code without making the redirection to the corresponding web page. I replicate exactly the example (tables, views, authentication, etc.) from the tutorial "Create User-Specific Redirect After Login" just to verify if I was doing something wrong within my application and the surprise was the same result. Login screen seem to be ok: and then: Please if someone can advise me what is going on I will really appriciated. My website is hosted in Squarespace using Chrome as browser. Thankyou in advanced Jaime Cuellar Monterrey, Mexico
  2. Hi, Just wanna share this code that I came up with where I have a Tabulare Report with Totals & Aggregations and a link at the footer of the DataPage wherein that link's destination URL will depend on the value of the Aggregate. In this example, if the Aggregate has a value of zero, the link will lead you to URL1, but if it has a value that is greater than zero, it will lead you to URL 2. The first thing you're gonna want to add is the link on the footer (it could also be in the header, does not matter): <a id="conditionalbutton">CONDITIONAL BUTTON</a> You can change this up to however you want but you have to make sure to keep in the id="conditionalbutton" part. This is important because this is what the JavaScript (provided in the next step) will be referring to when assigning the appropriate URL to the link depending on the Aggregate value. Below is the JavaScript code (which you'll paste on the footer): <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { var agg = document.querySelector(".cbResultSetTotalsDataCellNumberDate").innerHTML var cb = document.querySelector("#conditionalbutton") if(Number(agg) > 0){ cb.href = "www.google.com" }else{ cb.href = "www.facebook.com" } }); </script> You can replace the URLs as you see fit. In the above example, replace "www.google.com" with the URL that you want for the link if the Aggregate has a value greater than zero. Replace "www.facebook.com" with the URL that you want for the link if the Aggregate;s value is zero.
  3. I have three fields in an Update Datapage (ManagementExpenses, FundraisingExpenses, and TotalRevenue) that I need to format as only numbers (no currency symbols), if someone enters $11,500.51 it would render 11500.51 or $1,500,000 would render as 1500000. I then use the numbers on a separate onchange function that calculates a % based on the three numbers in that same page. Could anyone help me with a script to remove any currency symbols if the user inputs them? I appreciate the help!
  4. Hello - I need help for custom JS to compute and display the Calibration_Due in a submission form when the user inputs the Last_Calibration date and the Calibration_Frequency · Calibration_Due = Last_Calibration + Calibration_Frequency Where field types are Calibration_Due – date Last_Calibration – date Calibration_Frequency – number of months
  5. I have a script that formats the phone number input to a particular mask, which works great. There are three fields in this Datapage that need the same masking script and currently I have copied the code three times and simply changed the field that it refers to (code below). I am wondering if there is a way to add an array to this so that if you update either the Finance_Phone, Primary_Phone or Additional_phone the script will run. That way the full script is on the page only once and not copied three times. function f_a(v_id) { return document.getElementById(v_id); } f_a('EditRecordFinance_Phone').maxLength = 14; f_a('EditRecordFinance_Phone').onkeyup = function(v_e) { v_e = v_e || window.event; if (v_e.keyCode >= 65 && v_e.keyCode <= 90){ this.value = this.value.substr(0, this.value.length - 1); return false; }else if (v_e.keyCode >= 37 && v_e.keyCode <= 40){ return true; } var v_value =(this.value.replace(/[^\d]/g, '')); if (v_value.length==7) { this.value = (v_value.substring(0,3) + "-" + v_value.substring(3,7));} else if(v_value.length==10){ this.value = ("(" + v_value.substring(0,3) + ")" + v_value.substring(3,6) + "-" + v_value.substring(6,10)); }; }
  6. My site has public and private pages. The public pages contains long lists of items. When a user selects an item they are taken to a private details page for that item; however they must be logged in. Currently, if the user is not logged in then they are taken to the login page and upon login they are redirected to the index page. However, I would like the user to be redirected to the private details page that initiated the login. I.e. I don’t want the user to have to find the item again once they are logged … they should just be taken to that details page upon successful login. Description is a little confusing but hopefully someone understands! Thx
  7. Looking for a script in data pages, where if the phone number doesn't exist, the image presently used for phone number changes... I have a similar script for "Yes/No" fields but don't know how to manipulate it for from Yes/No to Blank/not blank.. Any input is appreciated.
  8. I've added a map to my datapage, but when it displays the script that was added to the html block displays on the data record and the map does not function. Is there a step I missed in the map mashup instructions? I gone through it several times with the same results.
  9. I use a script in the footer of every datapage to have the tab header include my logo & the name of the datapage. What I need now is for the tab header to also include a string field from the datapage...how do I do that?Current footer code is:<script>var v_link = document.createElement('link');v_link.setAttribute("href", "http://login.zalipresents.com/wp-content/uploads/2015/09/Zali_logo_Z_Tab_Icon.png");v_link.setAttribute("rel", "shortcut icon");document.head.appendChild(v_link);</script>I'd like to have the tab label read: Z (logo inserted like screen shot) WORKING - [Artist]...i'd like this artist name to also show up in the little box that pops up when you hover over the Z or WORKING. Any suggestions? The field is called "Artist"
  10. Rather than having 3 Datapages in order to restrict fields and data for 3 different user types, can a script be used to provide "section-level" security?
  11. I am having trouble with this simple if statement. I would like to update a checkbox field if a separate field is "Final Staff Review". The script I have is: <script> function = applocked(){ if (document.getElementById("EditRecordReviews_ReviewStage").value == "Final Staff Review") { document.getElementById('EditRecordApplication_Detail_AppLocked').checked = true;} else { document.getElementById('EditRecordApplication_Detail_AppLocked').checked= false; } } document.getElementById("caspioform").onload = applocked; </script> Am I missing something? The field is a Yes/No field and it is on the datapage as a checkbox field. I also have several formulas deployed on this page, could that be impacting this? This is currently not working.
  12. I have a submission form with a drop down menu listing National or Local. I would like a way that if the user selects "National" in the dropdown menu, upon submission of the form the StateCampaign checkbox field is set to "yes". Thanks.
  13. I have a submission form with a drop down menu listing National or Local. I would like a way that if the user selects "National" in the dropdown menu, upon submission of the form the StateCampaign checkbox field is set to "yes". Thanks.
  14. I have my login page deployed which is working fine. the User ID is a text field that is a 9 digit number, often seen by the user as XX-XXXXXXX. In the input for the login screen, if someone enters the hyphen, I'd like to add script to remove it so it happens in the background. This is what I added so far that is not working: <SCRIPT LANGUAGE="JavaScript"> function nophyphen() { var a = document.getElementById("xip_EIN").value; a = a.replace(/-/g, ""); } document.getElementById("caspioform").onchange=nohyphen; </script>
×
×
  • Create New...