Jump to content

Search the Community

Showing results for tags 'attribute'.

  • 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 1 result

  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>
  • Create New...