MayMusic

Caspio Evangelist
  • Content count

    1,037
  • Joined

  • Last visited

  • Days Won

    40

MayMusic last won the day on April 11

MayMusic had the most liked content!

3 Followers

About MayMusic

  • Rank
    Advanced Member
  • Birthday May 19

Profile Information

  • Gender
    Female
  1. Let's say you have a field called GroupName in your authentication table and if the GroupName is admin you want to check Approved Checkbox in your submission page. You can use the code below in the footer of the page <script> if ('[@authfield:GroupName]' == 'Admin') document.getElementById('InsertRecordApproved').checked="true"; </script>
  2. The ID of a radio button does not seem to be correct. Refer to It should be something like, InsertRecordMetalic_Injury0, InsertRecordMetalic_Injury1 .... Also you do not need == true <script type= "text/javascript"> function ValueChanged() { alert("Function Called"); if(document.getElementById("InsertRecordMetalic_Injury0").checked){ document.getElementById("InsertRecordPrior_Surgery0")0.style.background = "yellow"; } document.getElementById("InsertRecordPhone").focus(); } document.getElementById("InsertRecordPrior_Surgery0").onclick= ValueChanged; </script> But I am not sure how to change the background color
  3. If you have a a list or gallery report you can add HTML Block before all selected fields in your report page , disable HTML editor in advanced tab and open a hyper link tag. <a href="[@field:URL]" style="cursor:pointer; text-decoration: none;"> And add another HTML Block at the end of the list, disable HTML editor in advanced tab and use this code: </a> It will create a hyper link of the record to the website. You need to replace [@field:URL] and select the field that keeps URL from the picker
  4. If the virtual is 3 you need to use this code <script> function HideButton(){ if (document.getElementById("cbParamVirtual30").checked || document.getElementById("cbParamVirtual33").checked) { document.getElementById("Submit").style.display = 'initial'; } else if (document.getElementById("cbParamVirtual31").checked || document.getElementById("cbParamVirtual32").checked) { document.getElementById("Submit").style.display = 'none'; } else { document.getElementById("Submit").style.display = "visible"; } } document.getElementById('caspioform').onmousemove = HideButton; </script>
  5. Try this: <script> document.getElementById("caspioform").onsubmit= function (){ var str= document.getElementById("EditRecordImage_File_1").value; var pieces = str.split("\\"); var filename = pieces[pieces.length-1]; document.getElementById("EditRecordtextfield_1").value = '[@cbBridgeServer]/dpImages.aspx?appkey=APPKEY OF YOUR DETAILS PAGE HERE&file='+/filename; } </script> Change APPKEY OF YOUR DETAILS PAGE HERE with the appkey of the page you are placing this code in the Footer for. But the issue in here is that if you have the same file with the same name already, the name will get changed after submission and it is not going to be the same in URL anymore.
  6. Add the code below to the Footer of the page replace InsertRecordZip with ID of your zipcode field: InsertRecordFIELDNAME <SCRIPT LANGUAGE="JavaScript"> function zip() { var zipcode = document.getElementById("InsertRecordZip").value; // here you get what the end-user typed if (zipcode != "") { document.getElementById("InsertRecordZip").value = (zipcode.replace(/[^\d]/g, '')); // then you strip off all the spaces var zipcode1 = document.getElementById("InsertRecordZip").value; document.getElementById("InsertRecordZip").value = zipcode1.substring(0,5) + "-" + zipcode1.substring(5,10); } } document.getElementById("InsertRecordZip").onchange=zip; </SCRIPT>
  7. Insert the code below in the Footer of the page in source tab and replace the IDs on this line to your listbox IDs: Array("InsertRecordState", "InsertRecordCity"); <SCRIPT LANGUAGE="JavaScript"> var o_els = new Array("InsertRecordState", "InsertRecordCity"); for (var i = 0; i < o_els.length; i++) { document.getElementsByName(o_els[i])[0].multiple=true; } </SCRIPT>
  8. Do you want to save this info? If you want to save them then you need to have cascading element. If it is for showing purposes you can create a per-defined details page and instead of selecting the account on the same page search for it and see the details and add the submission page where you have deployed details page.
  9. I am not sure why you are having virtual 4 as cascading element but there is a syntax error on your code in this line: document.getElementByName("cpParamVirtual4")[0].value=p2; which should be document.getElementsByName("cpParamVirtual4")[0].value=p2;
  10. This should be what you are looking for: <SCRIPT LANGUAGE="JavaScript"> function con1() { var v2 = document.getElementById("InsertRecordVirtual2").value; if (v2 !="Don't Share") { document.getElementById("InsertRecordCON_1").value = v2; } } document.getElementById("caspioform").onsubmit=con1; </SCRIPT>
  11. try to remove the value of the text field before assigning new value function modify() { //Store the value in the field to trim. var trim = document.getElementsByName("InsertRecordBarcode")[0].value; //Take a substring of trim and store it back into new trim value. trim = trim.match("%2(.*)%"); //Set the value of the weight field in the form to the new substring document.getElementsByName("InsertRecordBarcode")[0].value = ""; document.getElementsByName("InsertRecordBarcode")[0].value = trim; //the new value in the field is what is submitted. }
  12. You need to give your page a new ID by adding div to header and closing it in Footer: Header: <div id="mypage"> Footer: </div> and then in the line where you have $('#caspioform').signaturePad({drawOnly : true}); Replace caspioform with "mypage" $('#mypage').signaturePad({drawOnly : true});
  13. Download button is downloading whatever user retrieved on report page, there is no point to move it to search. If you have search and report on one page and you want to see download over on search page then "position:absolute" might help.
  14. You can fire the function on a different event like when the second value goalcount is entered and focus goes to another field <script> function onSubmitClick() { var box1 = document.getElementById('InsertRecordsubgoalcount'); var box2 = document.getElementById('InsertRecordgoalcount'); box2.value = box1.value; } document.getElementById('InsertRecordgoalcount').onblur = onSubmitClick; </script>
  15. For the many to many you have to break it down to two one to many relations so you need to have an extra submission page to add to this join table. As for the Grid, if possible give me the URL to take a look. Probably you need to check and see if you have a fixed width for some columns in your report