Jump to content

Search the Community

Showing results for tags 'javascript'.

  • 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

  1. I have a specific form that creates a new entry in a table, and I need it to NOT create an entry if one already exists, instead just go to a diferent page altogether. I can prevent the duplicate entry by making a field unique, the form submit will fail and no new entry will be made. Problem I have is that the initial page that makes the table entry auto-submits when you open it (which is by design). If it successfully completes the table entry, it then auto-loads the next datapage, however if it fails the submit it actually reloads the entire page which in turn tries to re-submit the docume
  2. I have been pounding my head against a wall on this one. I need to do data validation for two fields in a tabular report data page in two different scenarios. I have been successfully using the following code to validate one field: <script> var nameOfField = "InlineAddWhole_Value_Perc_Split_to_Agent"; document.addEventListener('DOMSubtreeModified', function(){ if(document.getElementsByName(nameOfField)[0]) { document.getElementsByName(nameOfField)[0].addEventListener('change', function(){ var cash= document.getElementsByName(nameOfField)[
  3. Hi there, How can I create a chart using just values from table fields but not the count/sum functions? My result set is 1 row and I want to show values on a chart. If value is blank - I don't want to show it on the chart. Any help will be appreciated. Regards, vitalikssssss
  4. RE: I've got a question. I used the code and have a bit of an issue. What if there's more than 1 page? It will not calculate the balance since it's a new page and the last balance is not recorded on anyway so the it will not run. Does anyone have any ideas how it can be done? Thank you!
  5. I've got a dropdown menu that I need the links to run a function in order to open a new window (in '_self') and then change that new window's iframe source (same domain as parent). I'm calling the function from a linked js file that runs the code correctly but ONLY if the new window is opened in a new tab. I've seen a lot of posts about how to transfer the js function to the new window but none of them if it's opened '_self'. Here's what I have so far (It's on a test server right now, hence the 127 address for the js file): function newWindow() { var win = window.open('projects/proj
  6. I know that there are jquery tools used to completely customize standard form elements such as checkboxes, radio buttons, and dropdown menus. Are there any scripts and ways of styling them in Caspio? If so, what's the easiest way to go about doing it?
  7. Hello, Does anybody know how to disable autocomplete on text input fields? THANKS
  8. Hi, I have a Details (or single record update, haven't decided yet) form that, when updated, I need to open a fancybox that brings up another web page. The Details/Single-Rec-Update form would ideally be set to 'Same Form' for destination but I think I need to use Message in order to put code in. The below code is taken from what I'd been using with a button to open the fancybox but with the data-href put in (whereas the button would put that in before). Does anyone know what mods need to be done to this code for it to work (open a fancy box with a new web page after submission/upda
  9. Unfortunately, this cannot be done with a table trigger because this table is updated by other datapages as well. I have a report that searches training dates, lists providers, and sets an indicator based on the fact that the provider took a training. The indicator can be set to yes for each provider with a bulk edit. An indicator date needs to be added when the indicator is set to yes. If this date is not added, I want it to default to the training date. It seems like it would be easy but I can't get the indicator date to save the training date value in the bulk edit if it is blank. The
  10. Hello guys, How can I use the timestamp as a default or initial value of my DateTime field in a Details page? I set the Form Type to Text Field, but I can't see the On Load option in the Advanced Tab. If I set the field as Hidden, I get that On Load option, but at the expense of not being able to edit it. Please help. -dspolyglot
  11. Hello, I've got a Single Record Update datapage that has a number of cascading dropdowns. I need to check 2 values (one a table's field and the other a virtual field) and if they're not equal then make the cascading drop down values null or blank. I can get this to work for a regular text field but not cascading dropdowns. The code so far is: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { var x = document.querySelector('[name*=cbParamVirtual1]').value; var y = document.getElementById("EditRecordProjectID").value; var xclear =
  12. I am trying to run the following JS to make sure the value in one field has been entered in decimal form, but I can't get it to work. I have tried multiple iterations/adaptions of suggestions I have found on the forums. Any help would be appreciated. Thank you! <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function () { event.preventDefault(); var a = document.getElementsByName("InsertRecordSplit_To_Agent"); if (a[0].value <=0 || a[0].value >1) { alert('Split to Agent value is not in the correct range. Please enter split percentage in decimal
  13. Hello, I'm trying to reference a field, in a Details datapage, that is a cascading dropdown (the field is a text field called 'Area'). I need to disable it conditionally using javascript (I've found that when there are a lot of Rules it significantly slows the datapage loading compared to using js, so I need to use js to do this). I've been able to do this no problem with regular text fields and dropdowns but can't get it to read the cascading dropdown. I've been trying to use something like: var v_area = document.getElementsByName("EditRecordArea")[0]; along with the di
  14. Hi, I took some code from one of Caspio's demo apps (an appointment scheduler) to create a Time Picker on a Submission form. This works great, allowing far more detailed calendar scheduling than just using the date without a time. The issue is when the user needs to edit the date/time from the Calendar, in Details view. The code doesn't work in this case. I've changed the 'InsertRecord' part to 'EditRecord' but that doesn't seem to make a difference. Is there some difference to calling the code from the Update button vs a Submission button? Any help would be greatly appreciated. Bel
  15. Hopefully someone can look at this particular scenario and show how to open the popup in modal with an overlay background. A couple issues: I cannot use an iframe for the popup content (passing parameters to a Caspio datapage, which doesn't work smoothly via iframe). Nor can I use a div for the content (because it's an entirely different datapage) that's in the same datapage as the button that creates the popup. So I need to open an entirely new url in a window, as a popup. The new url (web page) will have a datapage embedded. The code below does this fine but I also need it to
  16. Hi, I was wondering how can we add a default value to the "Sort By" dropdown menu. I am not seeing any options through the menus.
  17. Hello, I have a field that normally would be a cascading radio button whose value is dependent on the selection of another field's dropdown value (the parent). However, I need the user to be able to over-ride the cascaded value occasionally. You can't do this normally so I'm trying to use js to do it. There is a text field set to Dropdown, called 'SalesCode.' A Virtual field (Virtual 18) is set to Cascading Text Field so it can receive a value when 'SalesCode' (the parent) is updated. The text field called 'Taxable' is the one I need to update. It's set to a Radio Button
  18. I am running a calendar data page which shows different code for service types in a day. Would like the all elements of the service type background to be certain colors. I found this link in the forum but is not working.
  19. I am trying to pass fields with special characters such as a Hash(#) over query string? I am new to Javascript, but I copied the Javascript from the answer below, and it works fine on the first link of the grid, but all the rest of the links have the parent URL and none of the data. It is building the parameters properly for the first link. I inspected the broken link and I found: Do I need a loop? or do I need to refer to the links I am trying to encode a different way than document.querySelector(`#${link_id}`).href = `${base_url}?${params.join("&")}` Is th
  20. Hello, I'm using some code in the Destination section of a submission datapage, deployed in a popup, to update a dropdown field in another datapage. I can get it to work if the dropdown field is a simple text field (store and display the same field) but am having issues when the dropdown is set to store the Unique ID (integer field) but display a different text field. The purpose of the popup is for the user, when creating an inventory item on one datapage, to be able to add a new 'supplier' for it on the fly in another datapage. When the new 'supplier' is submitted, it's ID value
  21. I have an odd problem trying to work around the lack of "Distinct" query functionality within Caspio. My data has many to many joins and therefore the view lists a specific field multiple times. When I query to reach a list of these fields, there are obviously multiple rows. I am trying to eliminate those multiple rows and list a single row for each unique value in that field only. The problem is that the datapage is still formatted as if all the results are present. So I get multiple pages with only a single entry on each. While I can change the view to include more records per page, tha
  22. Hello, On a Details form, I have a text64000 field (uses Rich Text editor toolbar) to store an address value. This value can come from 3 different places, with different values from each, so, depending on which source the user chooses, I hide/show and use a virtual check box to run javascript on change, to paste a value from another virtual field into the text64000 field. <script> $("[name='cbParamVirtual19']").change(function(){ f_copy_print_address('cbParamVirtual22', 'cke_EditRecordItems_ShipAddress'); var v2 = document.getElementsByName("cbParamVirtual22")[0].value
  23. Hi, While being fairly new to javascript. I was wondering if it is possible to do a calculation with a Virtual field which is set up as cascading text field to look up information from a different table. I cannot get it to work while when using a regular text field and the data is put in manually it works.
  24. Good day. I have a display where I use the Totals & Aggregation Count function to total records. I would like to only display the rows where the total is greater that 1. Caspio expert session indicates that this can be done via Javascript. Any help would be much appreciated, thank you. Colin Hancox
  25. I was able to get this figured out. I needed to move my code to my footer. I have deployed an update datapage on Wordpress and the javascript below works fine. However, I deployed it on a Weebly website and it is not working. I have pasted the javascript below and then also the deployment code I put on Weebly. I have other custom javascript that is working on the same datapage, so wondering if the iMask might be the problem? Javascript in the Datapage: <script src="[@app:iMask/]"></script> <script type="text/javascript"> document.addEventL
×
×
  • Create New...