Jump to content

Search the Community

Showing results for tags 'onclick'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location


Interests

Found 3 results

  1. I have used the forum to get to this point so you may have seen some of my code that I grabbed from other posts. I have a single record update form, where I only want them to be able to select the update button if all of the fields are marked as 'complete'. It should be known that all of the 'complete' or 'missing data' fields are formulas in the table, however, I am referencing virtual fields in my code that are set to the formula fields. The url to my form is here: https://c5amf675.caspio.com/dp/32576000f879393a309d4a97b1bd My code for checking the virtual field values is here: <script language="JavaScript"> function check_numbers() { var disabled = false; if (parseFloat(document.getElementById("cbParamVirtual").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtua2").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual3").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual4").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual5").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual6").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual7").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual8").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual9").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual10").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual11").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual12").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual13").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual14").value)=='Complete') disabled = true; if (disabled) { alert("All fields must be complete"); return false; } } document.getElementById("caspioform").onsubmit=check_numbers; </script> What is really weird, is that even the following code will not show a message when I click on the update button. <SCRIPT LANGUAGE="JavaScript"> function check() { window.alert("Thank you.. Information is registered!"); } document.getElementById("caspioform").onsubmit=check; </SCRIPT> I tried this small alert function after I couldn't get my regular code to work. This was on its own and did not work. I am thinking that there is an issue somewhere where the onclick is not registering. Do any of you have any idea what might be the problem?
  2. How can I invoke an "onclick" event for a radio button of two choices Yes or No. <script type= "text/javascript"> function ValueChanged() { alert("Function Called"); if(document.getElementById("InsertRecordMetalic_Injury")[1].checked == true;){ document.getElementById("InsertRecordPrior_Surgery")[1].style.background = "yellow"; } document.getElementById("InsertRecordPhone").focus(); } document.getElementById("InsertRecordPrior_Surgery")[1].onclick= ValueChanged; </script>
  3. Hi, I have a form with 3 checkboxes. A visitor can select any checkbox to get the products they want: newspaper or magazine, both, or just one. --- The visitor can also select to get the e-newsletter, but only if the newspaper checkbox is selected. Else the e-newsletter checkbox is disabled (which is a rule set configured in the form that works fine). What I need.. is a function for if someone chooses both "newspaper" and "e-newsletter" checkboxes then decides that they don't want "newspaper" and deselect it (which leaves e-newsletter still checked). I need an onchange function that unchecks the "e-newsletter" checkbox at the exact same time newspaper is unchecked. Note - The exisitng rule makes the checkbox disabled and enabled, but it doesn't uncheck it. SAMPLE OF FORM: 1) [ ] Get this free newspaper /--> OC_news_print = id 1b) [ ] Get the e-newsletter too /--> OC_news_eletter = id 2) [ ] Get this different magazine -- SOMETHING LIKE CODE BELOW IS NEEDED - MINE / IT DOESN'T WORK --- <! -- vars NEEDED AT ALL ? var ocPrint = document.getElementById("InsertRecordOC_news_print"); var ocEnews = document.getElementById("InsertRecordOC_news_eletter"); --> function ocProductsCheck() { if (document.getElementById('InsertRecordOC_news_print').checked.length<1) { document.getElementById("InsertRecordOC_news_eletter").checked=false; } else { if (document.getElementById('InsertRecordOC_news_print').checked.length>0) { document.getElementById("InsertRecordOC_news_eletter").checked=false; } } document.getElementById("InsertRecordOC_news_print").onchange=ocProductsCheck; Thanks - Geoff
×
×
  • Create New...