Jump to content

Search the Community

Showing results for tags 'selector'.

  • 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. I found that I can hide table elements based on HTML5 data attribute values. This solves a shortcoming of Caspio datapage configuration options: If you have a datapage that uses Inline Insert, you will find that you must choose between allowing a field to be editable on Insert, and allowing a field to be editable on Edit. In my case, I wanted to allow Inserts with a date, but once the record was there, I didn't want the date to ever change. When you enable Inline Insert, you don't have this ability, because if you disable editing the date, then one can't Insert new records with a date. However, a unique HTML5 data attribute=name, value=InlineEdityourFieldName is only applied to rows opened for editing, not on the Insert row, so we can use the attribute and value combo as a css selector to target Edits and not Inserts. Here I add the class "hideDateEdit" to matches for my selector, then inline a style to hide that class. Actually, I'm adding the class to the parentNode of my match, so that the contents of the whole cell are hidden, in this case, the date's text input, as well as the adjacent calendar img for the popup calendar function. <SCRIPT LANGUAGE="JavaScript"> var elems = document.querySelectorAll('input[name=InlineEditDates_Date]'); for (var i=0, m=elems.length; i<m; i++) { elems.parentNode.className = "hideDateEdit"; } </SCRIPT> <style type="text/css">.hideDateEdit { display: none; } </style>
  2. I can't figure out a javascript to disable this checkbox, to the left of the Yes group. The script must check for Yes, because sometimes only the (blank) group exists, and sometimes only (blank) and Yes, and sometimes (blank) No and Yes. Can't use CSS as far as I can tell. The goal is to prevent the mass-selection of Yes records. I tried using some javascript browser addons to find an appropriate selector, but was my first time using and no luck. I also tried using .prev() in jQuery, but now I don't think the checkbox is a sibling. I tried modifying the code used to conditionally format rows, but those are inserted into HTML blocks for records, and so can't operate on Group rows. Thanks in advance!
  • Create New...