Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

415 profile views

MostlyJava's Achievements


Newbie (1/14)



  1. Hi there, I have the following code in a submission form: <script> window.onload=function(){ if (document.getElementById("InsertRecordPalmas").checked) {var new_value = "Palmas";} else {var new_value = "AAA";} document.getElementById("cbParamVirtual1").value=new_value; } </script> This code puts a certain value on Virtual1 (which is a TextBox) depending on whether Palmas Check Box is checked or not. It works perfectly, but it stops working when I turn the Submission Form into a Detail Report. I know is not the "onload" because I tested it without the if statement and it works, so I'm guessing it has to do with the way I'm referencing or calling Palmas Check Box. Does anyone knows why is the if statement behaving differently when the Submission Form is changed to a Detail Report? Thanks!
  2. This was helpful! If you say the other one is also possible, I'll keep looking for it, but this will work in the meantime. Thank you!!
  3. Hello there, I have two iFrames inside an HTML Page; one is a Submission Form, the other is a Report shown as Tabular. The iFrame with the Tabular Report receives parameters once you press "Submit" on the iFrame containing the Submission Form. It works, but I have to refresh the HTML Page in order for the changes to show in the Tabular Report. What I want is the iFrame containing the Tabular Report (or the entire HTML Page, either way is good) to refresh once i press "Submit" on the iFrame containing the Submission Form, so that the changes will show automatically after i send the parameters. Can it be done? Any help on this matter is appreciated!
  4. You are absolutely right, my mistake was having two separate "onload"s instead of putting both actions inside the same function. This helps me a lot! Thank you very much!
  5. Sorry, tried the code, but still unsuccessful. The first Radio Button on Virtual Field 1 still displays "BBB". I'll keep trying some variations on my own, if you find something else that can help me, please let me know. Thank You!
  6. You were right. My mistake was not adding the script when I did it for the Update button. Thank you very much!
  7. Hello there, I want to add some additional buttons to the report. The thing is, those buttons are not aligned with the UPDATE button that comes with the report, so I want to recreate that button to be able to align it with the rest and desable (display: none) the one that comes with the form. I was already successful with the submission one: <a href="javascript:window.submit()">SUBMIT</a> <script> function submit() { document.getElementById("caspioform").submit(); } </script> But I still cant find the way to do this for the UPDATE one. Does anyone knows how to do this?
  8. Hello Caspio Evangelist, and thank you for your help! I do have the code in the Footer section of the Data Page, and i can make the code work on a virtual field that is text. What I want to do is change the first option on a radio button, which belongs to a virtual field. this is the link to the form I am using. It's a test form that I am using just to not mess up the main one: http://b4.caspio.com/dp.asp?AppKey=e6b82000ba913c04f9af42f4b38b This is the code I currently have in the Footer of the Data Page: <script> window.onload=function(){ document.getElementById("cbParamVirtual1").value="AAA"; } </script><script> window.onload=function(){ document.getElementById("cbParamVirtual2").value="AAA"; } </script> If you open the link, you will see that the Virtual2 (Text Field) works, but the Virtual1 (Radio Button) doesn't. I know that Radio Buttons are referenced differently, but I have tried some variations and haven't been able to make it work. I have seen how to reference a Radio Button, and how to reference a Virtual Field, but haven't seen how to reference a Radio Button that is part of a Virtual Field.
  9. Hi there. Is it possible to condition the values of a radiobutton using Javascript? What I want to do is that, when the Data Page loads, checks if it meets a condition, and if it does, based on that is the value of the first option of my radiobutton. I haven't been able to make the first part work, and i want to make sure that works before adding the 'If' statement. Here's the code I'm currently using: <script> window.onload=function(){ document.getElementByname("InsertRecordVirtual1")[0].value="AAA"; } </script> I have also change it used "getElementById", and change the statement inside the parenthesis with "InsertRecordVirtual10", that last one based on what I found here: Radio Button: A radio button includes multiple options and each option has an associated ID. The ID is a name followed by a number: - InsertRecordFIELDNAMEX - X is the radio button option order, which starts at 0 and increments based on the order of each radio option. For example if your radio button has three options: Red, Blue, Green - Red is InsertRecordFIELDNAME0 - Blue is InsertRecordFIELDNAME1 - Green is InsertRecordFIELDNAME2 Is it possible to do what I am trying to do with a Virtual Field? If it is, how can I make it work? I appreciate your help!
  • Create New...