Jump to content

Search the Community

Showing results for tags 'inline'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location


Interests

Found 4 results

  1. Hi, Does anyone know how to use javascript to run calculations on a tabular report's results page, in inline insert and inline edit? I have code I run in the Details view to make a calculation when the user updates a field: document.addEventListener('DataPageReady', function (event) { var newmarkup = document.querySelector('[name*=EditRecordMarkUp]'); newmarkup.onchange = function() { var v_cost = document.getElementById("EditRecordCost").value; var v_markup = document.getElementById("EditRecordMarkUp").value; if(!isNaN(v_cost) && !isNaN(v_markup) && v_cost !=0 ){ var v_cprice = (Number(v_cost) * Number(v_markup)) + Number(v_cost); document.getElementById("EditRecordPriceMarkedUp").value = v_cprice.toFixed(2); } } }); This works great in the Details page, autofilling the field "PriceMarkedUp" when the user has entered a "Cost" and updates "Markup" value. The calculation is done for them. I also need to do this on the Tabular Results page, in Inline Insert for a new record and also Inline Edit for an update on the fly. Is it possible to do this? I guess you'd change "EditRecordMarkup" to "InlineEditMarkup" or "InlineInsertMarkup" but that doesn't seem to do it. Any suggestions would be great!
  2. I want to be able to limit inline edits/inserts on a datapage. I'm trying to limit a date to dates that are after 1 week ago. Is there a way I can do this?
  3. I have a submission form that cascades data results in several virtual fields. The virtual fields reside within sections that either hide or display those elements depending on their results. What I would like to do is have all the elements that are not hidden display on the same line. Unfortunately only the elements within each section have the advanced option to “continue next element on the same line”. Is there a way to display all elements and submit button all on the same line? I tried removing the sections thus allowing me to display all elements on the same line, but with some elements being hidden the table that displayed the elements would jump around. For example.. if virt1,virt4, and virt5 are displayed on a search, then on the next search virt4 and virt5 were hidden and only virt1 and virt15 are displayed, virt15 is displayed on the far end several spaces away from virt1. Providing an undesirable result of the table cells jumping around with each search.
  4. 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...