Jump to content


Caspio Rockstar
  • Content Count

  • Joined

  • Last visited

  • Days Won


DesiLogi last won the day on March 18

DesiLogi had the most liked content!

About DesiLogi

  • Rank
    Advanced Member

Recent Profile Visitors

2,382 profile views
  1. I just found this suggestion--this is ace! I hadn't thought of this workaround and it solves the very poor 'hourly' limit on Tasks. Thanks for posting PrinceZuko!
  2. Ok, after trying tons of stuff I finally came up with the answer, in case anybody needs to pull tabular, inline values from Caspio and use them in javascript. First, create a div with an id that uses the unique identify Caspio field: <div style="width:100%;text-align:right;" id='mydiva[@field:HProjectID]'></div> Then use some script with an EventListener to grap the current value in the div and use it as a parameter in some javascript. I have the js running in the a link. Whatever is in the div inside the EventListener function will show up in the above div. I use a c
  3. This code will run when the button is clicked (button id ="alertsbtn") and it will get the first value in the record set, and then cycle through all records. It doesn't get a value if the button in a record that's not the first is clicked. So it seems like this is fairly close to working, if someone can figure out the adjustment I'd really appreciate it. ** I have an alert box running to test the code, instead of the full code. <script type="text/javascript"> document.getElementById("alertsbtn").addEventListener("click", function(){ var isi = document.querySelector("#visi[@
  4. Hi CooperBackpack, Many thanks for the code--I was thinking it would be something like using innerHTML but didn't know how to implement it. Now it will read a value for @field:HProjectID but it's giving the same number '3' for each record. So it seems like it's not catching each row's (record) individual HProjectID value. Am I missing something else? EDIT: it's odd because the <span> shows the correct HProjectID value so it is getting that. The issue is the variable 'isi' doesn't seem to be picking it up, instead pulling a random value '3'. 2nd EDIT: I think the answer
  5. Hi, Does anyone know how, in a tabular datapage's results, to get a record's value and use it as a parameter in a javascript function that sets the source for an iframe on the host page? I have a link/button to run a js function in an html block in the tabular results (meaning each record has that link, so if there's 20 records there's 20 of the same links/buttons, one in each row): <input class="buttonlink" type="button" onclick="ifrtrack()" value="Reports" /> I have this code in the datapage's footer. It resets the source for an iframe (id="tracking") on the host page
  6. Hi LittleMsGinger, Thanks for the help with this. I did find the Current Week criteria and that does work well to bring up the current week. The problem is that the user might want to scroll before weeks and I think that locks you into the current week. If there's a way to have it open to the current week as per above but then be scrollable, by the week, to previous weeks, that's what I need. Thanks again for the help, though, much appreciated!
  7. A couple years later--just want to say this is perfect and really helpful- thanks for posting it.
  8. Ok I finally figured it out, if anyone needs this solution in the future. The first post in this thread shows how to dynamically update the source of an iframe in a new window, in a new tab, but I needed to do this in the same tab and the js code kept getting wiped out when the new location was opened (I tried to append script to the new page's head, etc. but never could get it to work). So the solution to opening a new location/datapage in the same tab and dynamically setting the source for an iframe is to use Caspio's unique abilities in conjunction with regular js/html. Sometimes it'
  9. I updated the original post with a closer, better solution and so have deleted this post.
  10. I've got a dropdown menu that I need the links to run a function in order to open a new window (in '_self') and then change that new window's iframe source (same domain as parent). I'm calling the function from a linked js file that runs the code correctly but ONLY if the new window is opened in a new tab. I've seen a lot of posts about how to transfer the js function to the new window but none of them if it's opened '_self'. Here's what I have so far (It's on a test server right now, hence the 127 address for the js file): function newWindow() { var win = window.open('projects/proj
  11. Just figured this out, if anyone needs it. Was simpler than I thought, just remove the button's onclick fucntion lines: <script type="text/javascript"> var width = 1100; var v_href= ""; parent.$.fancybox.open({ closeBtn:false, openEffect : 'none', closeEffect : 'none', modal:true, type:'iframe', autoSize:true, width:width, href:v_href }); </script>
  12. Hello, I can't figure out the right syntax for this jquery code to run automatically after submission/update. It runs now (in the datapage footer) when the Submit button is clicked (it opens a FancyBox) but I need it to run after submission by a slight delay. The reason is that on Submit table A runs a trigger that updates table B and the FancyBox (opens another datapage in an iFrame) uses table B. Sometimes the FancyBox opens too fast, before the trigger has updated table B, and so it doesn't show the latest value. I figure if the code that opens the fancybox runs in the
  13. I figured this out, if anyone else needs it. Basically, I have a button that uses the class to call the fancybox code but also an onclick that calls the submit code separately. This way both of the functions work in sequence. Here's the button: <button class="cbpop btaction" href="#" data-width="1100" data-href="../shortcuts/universal-item-search" onclick="myFunction()"><i class="fa fa-search fa-lg"></i></button> And here's the script in the datapage footer. I have the Destination set to 'Same Form.' Note that the code opens the fancybox in the parent as th
  14. Actually, I have a button that runs a version of the above code to open the fancybox. All I need to do now is make the form submit/update after the the fancybox is initiated (or before but I think that'll end the code running so the fancybox won't initiate). Does anyone know how/where to put code into this to submit the form? <script> $('.cbpop').each(function(index, el){ var width = 450; var v_href= $(el).attr('href'); var v_keyword= document.getElementsByName("EditRecordKeyword")[0].value; var v_key= "?key="; var v_urlend = v_key + v_keyword; if (v_href=="#") { v_href=$(el).attr
  • Create New...