Jump to content

Kennylj24

Members
  • Posts

    7
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Kennylj24 reacted to Mathilda in Text to list   
    As far as I know, it's not possible to convert any datatype to string. It's a new datatype and hope conversion capability will be added soon.
  2. Like
    Kennylj24 reacted to eetimm in Sum acrros fields   
    Check your fields for null values...Caspio cannot add values if any of them are null.  Try using the form:
    IsNull([@field:field1],0)+ IsNull([@field:field2],0) + .... + IsNull([@field:fieldx],0)
     
    This has worked for me.
     
    ET
  3. Like
    Kennylj24 reacted to LWSChad in Passing Parameters Without Refreshing Page   
    Parent and Child are two different web pages.
     
    Parent - lead-info-center.html (excuse my lack of code box, I wanted to highlight things to help explain)
    -------------------------------------------------------
    <body onload="setIframeSource()">
     <div id="frmSummary1" class="licFr">
      <div class="divHeader">
       <h2>Summary</h2>
       <a onclick="window.ifrLeadSummary.location.href = 'lic-leadSummary.html'"></a><!-- refresh button -->
      </div>
      <div id="ifrDiv">
       <iframe name="ifrLeadSummary" class="licIframe" id="ifrLeadSummary"></iframe>
      </div>
     </div>
    <script>
      //set iframe source
      function setIframeSource() {
        varLeadID = getQueryVariable("LeadID");
        document.getElementById('ifrLeadSummary').src = 'lic-leadSummary.html?LeadID='+varLeadID;
      }
    </script>
    ------------------------------
     
     
    child - lic-leadSummary.html
    -------------------------------
    <body>
     <div id="ifr" class="ifrContent">
      <script type="application/javascript" src="https://b5.caspio.com/scripts/e1.js"></script>
      <script type="application/javascript">try{f_cbload("***","http:");}catch(v_e){;}</script>
     </div>
    </body>
    -------------------------------   The child is basically an html file with only the Caspio Deploy code.
     
    If you want a param to come from another iframe, you'll need some way to set the variable.
     
    The example you provided loads an entire second page, but your question seems like you want it all on one page. 
     
    The code above using a URL Query Variable (web-page.html?variable=value) from the page load, but you can get the value of an element and add it to the setIframeSource script. maybe something like...
    <script> //on click, set iframe source document.getElementById('buttonID').onclick = function () { var pSearch = document.getElementById('searchElementID').value; document.getElementById('ifrLeadSummary').src = 'child.html?filterField=' + pSearch; } </script> *********************
    To Build and Test, use alert(someVar); or alert('step1'); throughout your code. It allows you to see what values your variables are set at,,,, and where your code is breaking (when I'm writing something new that is proving challenging, I'll put alert('step[X]'); after every line to dial it in)
×
×
  • Create New...