Jump to content


  • Posts

  • Joined

  • Last visited

egilley's Achievements


Newbie (1/14)



  1. JEllington - THANK YOU!! Ohmigoodness you saved my day!! Thank you so much!!
  2. kRv, I appreciate all the trouble you went to, to set up an example page for me but here I am almost two weeks later and I still have not solved this issue. I'm so sorry, but I don't understand what you're showing me and how it will help me with the javascript and getting the statement I want to drop into a hidden field. I have 156 fields and 156 statements and I can't have them all "showing" on the datapage I'm creating. My boss wants them hidden and I can hide them on the submission page - but there is a limit to the size of each datapage and hiding them there put me past that limit. douvega, I appreciate your help as well, but in the detail page it seems I can't use "EditRecordNameofField" unless the field is an active field within that datapage, meaning, again, that I would have to "show" all those fields. The individual parts of this statement I need to save are already saved, so that's why I used "[@field:NameofField] instead. If I make the target field an active text field rather than a hidden field, the whole thing works perfectly. But if I make it hidden, it saves nothing. <script> var clientrate1 = Number('[@field:customer_rd1]'); var otarate1 = Number('[@field:otaA_rd1]'); var date1 = '[@field:date1]'; var otaheading1a='[@field:ota_heading_a1]'; var statement1a="On "+date1+", the "+otaheading1a+" rate ($"+otarate1+") is lower than your rate ($"+clientrate1+")."; if (clientrate1 > otarate1) { document.getElementById("EditRecordwi_1a").value = statement1a; } </script> I've tried several ways, trying to work around this, and still have no answers. I will be bald soon!
  3. I'm still having the issue with not being able to save data into a hidden field - unless it's within a submission page, then it works fine.
  4. kRv, thank you so much for your input, I appreciate you taking the time to give me feedback!! In this particular case, it works as a numeric value, but you just helped me solve another problem!! I was getting a NaN when creating a variable number to add to a static date - and so I used your suggestion and it works perfectly now! Thank you!!
  5. Update: Since both were dependent upon the same "if," I moved the building of the statement into the submission form and allowed it to write to the hidden field there. Works perfectly. I would still like the answer though!! Is there something I need to do differently, to write to a hidden field in a detail datapage?
  6. In two separate dataforms I'm trying to do pretty much the same thing - and one works and the other doesn't! I don't know what I'm doing wrong. In my submission form, I have this: <script> function test(){ var clientrate5 = parseFloat(document.getElementById("InsertRecordcustomer_rd5").value); var otarate5 = parseFloat(document.getElementById("InsertRecordotaH_rd5").value); if (clientrate5 > otarate5) { document.getElementById("InsertRecordotaH_rd5").style.background="lightpink"; document.getElementById("InsertRecordissue_5_h").value = 1; }else{ document.getElementById("InsertRecordotaH_rd5").style.background="wheat"; document.getElementById("InsertRecordissue_5_h").value = 0; } } document.getElementsByName("InsertRecordotaH_rd5")[0].onchange=test; </script> It works perfectly. The issue_5_h field is a hidden field and depending upon the "if" it drops either a 1 or a 0 in the field. Great. Then in a Report / Details page, I have this: <script type="text/javascript"> var clientrate5 = '[@field:customer_rd5]'; var otarate5a = '[@field:otaA_rd5]'; var vdate5 = '[@field:date5]'; var vota5a = '[@field:ota_heading_a5]'; var issue5a = '[@field:issue_5_a]'; var statement5a = "On "+vdate5+", the "+vota5a+" rate ($"+otarate5a+") shows up lower than your rate ($"+clientrate5+")." if (issue5a > 0) { document.write(statement5a); document.getElementById("EditRecordwi_5a").value =statement5a; } </script> If the field is an active text field, it drops the statement into the field, no problem. But it will not drop it into a hidden field. Is this something that can only be done in a submission form? Or am I doing something wrong? Thanks in advance for any input!!
  7. Sigh... I said, "I need this URL link to open a new target window." And this doesn't do that. Any ideas?
  8. I took what she sent me and made a couple tweaks - and it worked, YAAAAAY!! In case anyone is interested, here is the script (inside an HTML block) that worked: <p id="demo"></p> <script> function test(){ var t1=document.getElementsByName("InsertRecordCustomer_URL")[0].value; str="CUSTOMER URL"; var result=str.link(t1); document.getElementById("demo").innerHTML=result; } document.getElementsByName("InsertRecordCustomer_URL")[0].onchange=test; </script>
  9. Well, I got the email. She sent me a script to use. Still didn't work. OMG.
  10. Thanks, but that didn't work either. After hours of struggling with this silly syntax, I called Support and she pointed out that I needed a function to call the cascade dropdown after it populates. So she tried this... <script> var clientweb; function test(){ var clientweb = document.getElementsByName("InsertRecordCustomer_URL")[0].value; } document.getElementsByName("InsertRecordCustomer_URL")[0].onchange=test; </script> But still could not get a working URL to display on the page. She's going to email me ... eventually, LOL. I can't believe how many hours I have struggled over this tiny, tiny item!
  11. Been tearing my hair out trying to find the right syntax. Tried this: <SCRIPT LANGUAGE="JavaScript"> var clientweb = (document.getElementsByName("InsertRecordCustomer_URL")[0]) document.write(clientweb) </script> Same result.
  12. I'm trying to display the results of a cascading dropdown box. In an HTML block, this seemed to me like the simplest of tests: <script type="text/javascript"> clientweb = document.getElementsByName("InsertRecordCustomer_URL")[0] document.write(clientweb) </script> but I'm getting this: [object HTMLSelectElement] Also, once I get the value of the field to display, I plan to make it a clickable URL - would appreciate any input on that, but I'm not even there yet, still just trying to just access the data! Help please?
  13. That's it! OMG that was so easy! I feel like I should have known that, somehow?! Thank you!
  14. I am trying to show graphics in a Submission Form, based on specific data, and so i'm inserting HTML block with "if" JS's... They work perfectly when the data is already saved in the current table. I'm using: var cb_punchin = '[@field:L1_time_in]'; But that doesn't work if the data is coming in from another page into a hidden field in my submission form. That data hasn't been saved in the current table yet. Is there a way to access saved data from a different table? Or a way to grab the data from the external data coming in? I'm learning JS in little bites... help with this would be very much appreciated.
  15. Happily, it seems to have been resolved. Whew! Thanks to the Caspio team for working quickly!
  • Create New...