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. 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 =
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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.
  7. 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
  8. 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.
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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.
  14. 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
  15. 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
  16. I've got 3 fields set as Listboxes on a Submit datapage. I'm using js to select multiple records and enter them comma delimited upon submission. The code works fine when doing it with one Listbox but I can't figure out how to get it to work for all three. Right now I'm just repeating the code for each listbox (with a different variable name for each) but it doesn't work. I imagine there's a more unified way to do this so the code covers all 3 Listboxes. Anyone have any ideas? Here's the code so far (it's obviously wrong to repeat the entire script 3 times, I just don't know how to unify
  17. I'm using a barcode reader to scan an order in a form, passing parameters to another form that scans the product sku, and the 2nd form opens itself up after each sku for however many skus are related to the order. It works well. The sum of the skus scanned by product are in another report datapage that updates on the same page the 2nd form is on. The report queries both the table used to scan skus for a sum by product, and a table containing data from shipping software that contains what should be shipped within it's table.... The only issue with this setup is that I'd
  18. Hi everyone, I am encountering an issue wherein a "Data Table" tooltip appears everytime I hover on a report data cell. I want to remove that one. Please help. -dspolyglot
  19. Hello all, I have an Update datapage where, on Submit, I need to 1) show a popup message saying the changes were saved and 2) close the window or tab of the host page. I set the 'destination' of the datapage to 'Close Window' and put the below js in the footer to show the message. <SCRIPT LANGUAGE="JavaScript"> function myFunction() { alert ('Your updates have been saved') } document.getElementById("caspioform").onsubmit = myFunction; </SCRIPT> The problem is the js seems to block the 'Close Window' function and the page just refreshes to 'same form' and shows
  20. In a table i have 12 columns like "Proof_for_Placement(File Filed)", "Document_Remarks_Placement(Text Field)", "Document_Upload_Date(Date Field)" etc. So i have created a coding if users upload a file in "Proof_For_Placement" the automatically "New" status will be taken in "Document_Remarks_Placement" filed and Timestamp will be captured in "Document_Upload_Date" filed. <script type="text/javascript"> function addTimestamp (fileInputId, timestampInputId) { var fileInput = document.getElementById(fileInputId); fileInput.addEventListener('change', function () { if
  21. I want to insert a the next 30th of June as a field value in a online form, based on the entered start date of a contract e.g. is the start date is earlier than 30 June of the current year, the value I need is 30 June this year, if the start date falls in July or later, is should be 30 June next year. (I need this date to do further calculations for milestone periods and budgets) I have tried to modify a few scripts dealing with related issues, but I cannot seem to make it work for this problem, I get either the wrong date format or no calculation/result at all Any help si
  22. In my search form in Reports DataPage, I want to select all the items in a multi-select listbox when my checkbox is checked. Also, when it is unchecked, all the items should be deselected. Any ideas?
  23. I have a details page I need to make calculations for multiple fields to do estimating. I am entering values in fields and need to create a cost on the form. I was successful in creating some of the calculations but after the 4th calculation is made, the rest of the fields to be calculated display NaN. Here is the script and attached is a screen shot of the results.... <button style="background:red" onclick="calculate()">Calculate</button> <SCRIPT LANGUAGE="JavaScript"> function calculate() { var a = [@field:Area1_Sq_Ft] document.getElementBy
  24. Hello, I have some js in the Destination part of a submission form, for after the Submit happens (I do this in js because there are 3 different sets of options to go to after submission, depending on what the user selected in the submission fields). I'm using window.location instead of window.open because of popup restrictions. I need to do 2 things on form submission: 1) have the existing window go to a url with parameters like a normal Caspio form can do and 2) open a different url in a new tab. So basically, the user clicks Submit, the existing window refreshes to a new pag
  25. Hi, I have a submission form with an image field. I need to be able to use js to bypass the user having to use the Browse button to pull the image path for the image to be submitted (so I can streamline a process of uploading images- I've got a field with the image path mapped to Downloads folder and have a Virtual field using it as a data source. I just need to put that path in the image field so the user doesn't have to Browse to it). I set up test code using a button to trigger the js function so I could see if it was putting the image path (Virtual 1) into the image field for
×
×
  • Create New...