Jump to content

Search the Community

Showing results for tags 'onsubmit'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Caspio Bridge
    • Caspio Apps for Ukraine
    • 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


Last Updated

  • Start


Filter by number of...


  • Start




Website URL






Found 2 results

  1. Hi @abelphathost, Thanks for the message, but let's not ask questions privately.... the point of a forum is for people to find that somebody else has already asked the same question. A couple things to note 1 - I've had trouble using JS and Caspio's checkboxes. Dropdowns are easier to work with. 2 - I never use 'onsubmit'. Rather i create a fake submit button that runs that code I need before the submit happens then wrap the function with: document.getElementById("Submit").click() ** If you must have something easier than a dropdown... This takes some work, but will allow you to do it. HTML block <style> #YOUR_FIELD_ID {display: none} .fake-radio { width: 120px; height: 50px; padding: 16px; margin: 16px 0 0 32px; font-size: 18px; float: left; } </style> <div class="fake-radio" onclick="document.getElementsByName('YOUR_FIELD_ID')[0].value = 'Yes';>Yes</div> <div class="fake-radio" onclick="document.getElementsByName('InsertRecordFieldName')[0].value = 'No';>No</div> YOUR_FIELD_ID 1. right click the field you want to populate > inspect 2. Look for <xx class="sample" id="XYZ_98sd7d" name="InsertRecordYOURFIELDNAME">Hi World</xx> 3. your answer is InsertRecordYOURFIELDNAME Try these suggestions and I'm sure you'll find your solution
  2. Hi all, I have 2 iframes on one webpage, one is a search submission datapage, the other a results datapage When I press a 'reset' button that I've created, I want the internal parameters in the search page to reset to null, but I also want the results page to update to a "Search couldn't find data" screen (otherwise I still see the results from the previous search). Refreshing the webpage URL adding "cbResetParam=1" has no effect, probably because the datapages are in iframes. So my thinking is that, (first) I should null the search datapage internal parameters, and this I can do with the 3rd line of code below. Then, (2nd) I need to 'submit' the search page, so that the results page updates with the null internal parameters I've just set. Both these code instructions work well independently, But when I combine them, as below, line 3 won't execute. Only line 5 executes. The result is that the whole webpage (incl. iframes) refreshes, but the internal parameters are not nulled. I've tried putting "&cbResetParam=1" on the end of the url on line 5, but there's no effect. Am I wrong to think that 2 actions can run simultaneously under one 'submit' function? Is my code just rubbish (which wouldn't surprise me)? function mygosubmit(){ var thisURL = location.href; location.href = thisURL +"&cbResetParam=1"; // THIS LINE WON'T EXECUTE !! if (window.parent && window.parent.postMessage) { window.parent.postMessage("refresh", "http://my_web_page_url.html"); // THIS LINE DOES EXECUTE !! }} document.getElementById("caspioform").onsubmit= mygosubmit; Many thanks for any help or hints
  • Create New...