Jump to content


Caspio Ninja
  • Posts

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    skauntey 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">
       <a onclick="window.ifrLeadSummary.location.href = 'lic-leadSummary.html'"></a><!-- refresh button -->
      <div id="ifrDiv">
       <iframe name="ifrLeadSummary" class="licIframe" id="ifrLeadSummary"></iframe>
      //set iframe source
      function setIframeSource() {
        varLeadID = getQueryVariable("LeadID");
        document.getElementById('ifrLeadSummary').src = 'lic-leadSummary.html?LeadID='+varLeadID;
    child - lic-leadSummary.html
     <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>
    -------------------------------   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)
  2. Like
    skauntey reacted to aam82 in Data Usage Thoughts, Tools, Tactics   
    I was able to reduce data usage by dp.asp by 2KB by copying Caspian, zeroing it out, and loading it locally instead. It can't truly be zeroed out, even in souce mode, but you can remove all parameters from each selector so that you have just table{} etc. in your Caspio CSS. Not a big improvement.
    I just ran a test, and found that my JS embed datapage draws 711KB for just 81 records, and the same datapage in IFRAME or URL deployment draws 125KB! (The report has a couple of unoptmized SQL queries. There might be more savings here. I think Caspio does its own optimization behind the scenes; nothing I did to my queries, views, etc, made the page any lighter.) I asked support to add this to the documentation this morning.
    So now I'm working on using IFRAMES where possible, but they're much harder to style!
  3. Like
    skauntey reacted to LWSChad in Data Usage Thoughts, Tools, Tactics   
    Hi All,
    I had a great conversation with Caspio support a few weeks ago that helped my significantly reduce the amount of data that my app uses.
    Here are the cliff notes.
    To see how much data your pages use, paste the URL from the deploy menu into a new web browser, and use a development tool or web inspector to investigate. (in Chrome press F12, and click the Network tab) Records per page is a big factor in data usage... nearly a linear relationship. Ajax is a big load up front, but will help if you encounter many "paging" actions... long reports. Happy Building
  4. Like
    skauntey got a reaction from LWSChad in Consolidating Various Search Boxes To A Single Search Field   
    Hi Chad
    I know I am late in responding but thanks for this. It is a clever solution.
  5. Like
    skauntey reacted to Parma2015 in Power Bi   
    Has anyone out there implemented or tested Power BI by Microsoft for presenting data from Caspio database?
    I would appreciate any experience.
  6. Like
    skauntey got a reaction from Aurora in How To Create Image Slideshow In Html   
    Hi Master,
    Please find working script below. Other than a change in timings (from 500 to 3500), bit of extra luck and help from Caspio, I can't spot much difference. My technical knowledge around coding etc.. is nearly zero hence I don't know what was the issue.
    Hope this helps
    <script type="text/javascript">
    var image1 = new Image()
    image1.src = "[@field:Image_1/]"
    var image2 = new Image()
    image2.src = "[@field:Image_2/]"
    var image3 = new Image()
    image3.src = "[@field:Image_3/]"
    var image4 = new Image()
    image4.src = "[@field:Image_4/]"
    Added to an HTML Block:
    <p><img src="[@field:Image_1/]" width="650" height="400" name="slide" /></p>
    <script type="text/javascript">
    var step=1;
    function slideit()
    document.images.slide.src = eval("image"+step+".src")
  • Create New...