Jump to content

cgonzalezalcala

Members
  • Content Count

    6
  • Joined

  • Last visited

About cgonzalezalcala

  • Rank
    Newbie
  • Birthday 09/19/1985
  1. Awesome! That did the trick. Thank you Vitalikssssss!!!
  2. Hi tech savvy friends! I am trying to use a javascript code I found online that enables a table to autoscroll. I want to use this to showcase a list of supporters of our organization (using Caspio's Gallery Report), and I need this function because 1) caspio only allows 999 records to be display in the tabular report, and 2) I don't want viewers to have to click through the pages to show the rest of the records. The javascript I found is this: <script> var my_time; $(document).ready(function() { pageScroll(); $("#contain").mouseover(function() { clearTimeout(my_time); }).mouseout(function() { pageScroll(); }); }); function pageScroll() { var objDiv = document.getElementById("contain"); objDiv.scrollTop = objDiv.scrollTop + 1; $('p:nth-of-type(1)').html('scrollTop : '+ objDiv.scrollTop); $('p:nth-of-type(2)').html('scrollHeight : ' + objDiv.scrollHeight); if (objDiv.scrollTop == (objDiv.scrollHeight - 100)) { objDiv.scrollTop = 0; } my_time = setTimeout('pageScroll()', 25); } </script> I am sure the code, as is, is not calling elements in Caspio, if I knew more coding (or had more time to look into it) I would try to mess with it. So, instead I am hoping one of you out there can help me out, please! I found this code here: https://codepen.io/salman31/pen/dYdGLa/ I would greatly appreciate your help with this. Thank you!!!
  3. Try this. After hours of googling came across it. Used on wordpress. <script> function submitallforms() { setTimeout('document.forms[0].submit()',100); setTimeout('document.forms[1].submit()',200); setTimeout('document.forms[2].submit()',300); } // End --> </script> <input type=button value="Submit" onclick="submitallforms();">
  4. Yes I want a fifth field to show the sum while text is being inputted in the field. I got a script to work, yet the data is not populating my table. This is what I borrowed to make the table do what I wanted, now my problem, like I said is that I can't get the data to populate my Caspio table since I wrote this on an HTML block. Any ideas? <script type="text/javascript"> function calcSum() { var Sum = 0; Sum = Number(document.getElementById("Q7_r1").value) + Number(document.getElementById("Q7_r2").value) + Number(document.getElementById("Q7_r3").value) + Number(document.getElementById("Q7_r4").value); document.getElementById("Q7_tot").value = Sum; } </script> <table border="0" cellpadding="1" cellspacing="0" width="60%"> <tr> <td width="40%"> <b>Reasons poverty exist</b> </td> <td> <b>% Percent each contribute to poverty</b> </td> </tr> <tr> <td> Low income people themselves are to blame for their situation </td> <td> <input name="Q7_r1" id="Q7_r1" type="text" size="3" onblur="calcSum()">% </td> </tr> <tr> <td> Lack of community resources or willingness to help the poor </td> <td> <input name="Q7_r2" id="Q7_r2" type="text" size="3" onblur="calcSum()">% </td> </tr> <tr> <td> Exploitation of the poor (pay day lenders, low-wage employers, etc)</td> <td> <input name="Q7_r3" id="Q7_r3" type="text" size="3" onblur="calcSum()">% </td> </tr> <tr> <td> Government policies and barriers that will always keep the poor in poverty </td> <td> <input name="Q7_r4" id="Q7_r4" type="text" size="3" onblur="calcSum()">% </td> </tr> <tr> <td> <b>TOTAL</b> </td> <td> <b><input name="Q7_tot" id="Q7_tot" size="3">%</b> </td> </tr> </table>
  5. Hi Caspio Ninja! Thanks for the tip. My CSS knowledge is limited so my first go at it did not work. I have four variables that I would like their sum to add to 100. Here's what I did... <script type="text/javaScript"> function mySum(){ var one = parseInt(document.getElementById("Blame_Low_Income,").value); var two = parseInt(document.getElementById("Lack_of_Community_Resources").value); var three = parseInt(document.getElementById("Exploitation_of_Poor,").value); var four = parseInt(document.getElementById("Government_Policies_and_Barriers").value); if(!one) { one=0; } if(!two) { two=0; } if(!three) { three=0; } if(!four) { four=0; } document.getElementById("five").value = one + two + three + four; } document.getElementById("Blame_Low_Income,").onchange = mySum; document.getElementById("Lack_of_Community_Resources").onchange = mySum; document.getElementById("Exploitation_of_Poor,").onchange = mySum; document.getElementById("Government_Policies_and_Barriers").onchange = mySum; </script> Thanks so much for helping out!
  6. Any luck with figuring this out? I also would like for a field that shows dynamically when the above four fields are being filled out and returning a sum for those fields.
×
×
  • Create New...