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 am using the JavaScript from this "Limit the Number of Submissions" article to display one hyperlinked image or another hyperlinked image based on meeting a condition. This is the original JavaScript from the article: <script> if([@field:Attendees] <[@field:Maximum_Attendees]) { document.write("<a href='SubmissionURL&Course_ID=[@field:Course_ID]'> Signup </a>"); } else { document.write("<p>Signup Closed</p>") } </script> This is my modified version with image links instead of text links: <script> if([@fiel
  2. Hi Caspio newbie here! I'm trying to do email verification, most of it works fine but the only way to change the verification status to yes is to manually run the datapage I created called email_verification. the email sends okay and the link copies the GUID but it doesn't change the field status. I tried copying the script on the help page to get automatic updating but it doesn't appear to work....my code is as follows <script> document.getElementById('caspioform').onsubmit = function (){ document.getElementById('[@field:Email_Verified^]').checked="y"; } </script&
  3. Hi there, I have tabbed content on my page. One of which looks like this: <li><a data-toggle="tab" href="#menu4" style="background-color: #10368F; color: white;">5. TEST RESULT</a></li> I'd like to change the background color of this element to grey IF my dropdown (named [@Expected_Outcome]) equals Business Insight. I know I can probably figure this out, but my brain is turning to mush from looking at this and I have a deadline looming!! Can anyone help me write the correct script? Many thanks Nikki
  4. Hi there, I would like to timestamp a field (Test_Completed), but only if it hasn't already been timestamped and only if a different field (Actual_result) has content. I found a forum answer about timestamping a field, and have tried to modify it to include my conditions, but I am not too good with JavaScript! This is what I've done, can anyone help?? <SCRIPT LANGUAGE="JavaScript"> /* Declaration and initialization */ Stamp = new Date(); var v_TimeStamp; Hours = Stamp.getHours() Mins = Stamp.getMinutes(); /* Construct the value of the v_TimeStamp variable in the
  5. We have a requirement for our Users to be able to update v quickly a large number of records within a tabular type report. The Bulk Edit/Update on its own wont work for us as we need to - when updating each of the records - to concatenate two Notes fields together along with a system date within each record and update another field. We can do this quite easily with JS in aa single Details Page (simple JS concatenating the two different notes values and adding today's date). However this approach does not seem to work on the Bulk Edit/Update - as whilst we can change a common field value ac
  6. Hi, I'm trying to run a 'change' function on a virtual field ONLY when a regular field is Null. This is in a submission form. The code I have below seems to run automatically when the form is opened, I guess because the virtual field is a cascading dropdown so it's 'changing' when the form is loaded, based on the parent field. I only want this code to run if the 'ItemID' field (ItemID is not the parent of the cascading Virtual9) is null. If it is not null then I need this code to not run at all, even onload. I've tried a bunch of different 'if' scenarios but can't get it to wo
  7. I am trying to filter datapages that are embedded within a page that I show within an iframe and I can not seem to get the parameters to pass into the I-Frame when the parent page is loaded. I have a "Project" report with custom link to details page. This link passes Project_ID fine to datapages actually embedded on the target page. What I want to do is embed other pages (hosted on same domain) via IFrame and have the results of datapages embedded on the page shown in iframe filtered by the Project_ID. I want to use I frames to reduce load time, data usage and also have the ability to
  8. I'm trying to hide a tabular report if a given comparison returns as false. I have the below code that works to hide the table no matter the result: <script language="javascript" type="text/javascript"> function hide_column(column_order) { var tbl = document.getElementsByTagName("table")[0]; var table_header = tbl.getElementsByTagName('th')[column_order]; table_header.style.display=stl; var rows = tbl.getElementsByTagName('tr'); for (var row=1; row<rows.length;row++) { var cels = rows[row].getElementsByTagName('td'); c
  9. I use a script in the footer of every datapage to have the tab header include my logo & the name of the datapage. What I need now is for the tab header to also include a string field from the datapage...how do I do that?Current footer code is:<script>var v_link = document.createElement('link');v_link.setAttribute("href", "http://login.zalipresents.com/wp-content/uploads/2015/09/Zali_logo_Z_Tab_Icon.png");v_link.setAttribute("rel", "shortcut icon");document.head.appendChild(v_link);</script>I'd like to have the tab label read: Z (logo inserted like screen shot) WORKING - [Artist
  10. I'm trying to get some js to work with a Virtual field (currently set to a list box with 3 choices) when the selection changes (i.e. when the user clicks on choice 1,2,or 3 in the list of the Virtual field). I was able to get the rest of the code to work using a button but I'd like it to work directly when the user changes the selection in the listbox of the Virtual field. Here's what I've got so far. It's the onchange part I need help with: <div style="text-align: center;"> <script> $("[name='cbParamVirtual1']").change(function(){ var dtid = document.getElementsByName(
  11. ANY help would be greatly appreciated!!!! Okay, I have a script that I think should work, but I can't get it to function....Here it is: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script> <script> $("#caspioform").submit( function() { var selectedopts = $('[name=cbParamVirtual1]').getChildren(); for(i=0;i<selectedopts.length;i++) { if(selectedopts[i].val() == '') { return false; } } }); </script> The script is trying to validate the input (into a text field via barcod
  12. Does anyone know any code for collapsing or expanding sections in a Pivot Table and a Tabular table? For example lets say that column 1 is 'Regions' and Column 2 is 'Countries'. The pivot table table is set up to show all regions and all countries expanded. I'd like to set up a button outside the results table to be able to collapse all countries, all in one go, to just show region totals, without having to go through each region individually. Many thanks in advance.
  13. I have the following code in the footer and it produces a button on the bottom of my results page that works to redirect the user to another url. <script type="text/javascript"> if(!document.getElementById("norecord")) { document.write('<button onclick=document.location.href="https://www.myirlog.com/logbook/new-record-entry">No, Really, I want to add a new record</button>'); } </script> However, when I put that same code inside of an HTML block, it does not work: <script type="text/javascript"> if('[@field:participant_1
  14. Hi! This is my first question on this forum, so I apologize if this question is not in the scope of the board I followed this thread to concatenate values from four virtual fields onto an existing field on a details page upon "update". I added the code below to the footer of my details page, and it worked when my virtual fields were text fields. However, this code did no longer worked when I changed my virtual fields to autocomplete fields. Is there another step I need to convert the autocomplete to text? <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var x0 = doc
  15. Javascript help please I have a web page on which I wish to display a hyperlink depending on the status of a specific field from my authentication table. The authorisation field “[@authfield:Staff_List_Branch_Type]” has two options which are “FS” or “SIS”. Depending on the authorisation of the user I would like to display a link that will take the user to a specific web page depending on their Branch_Type status. So if your autfield branch type is “FS” a link will display that will take you to web page A, however if your branch is “SIS” a link
  16. Hi @abelphathost, Thanks for the message, but let's not ask questions privately.... the point of a forum is for people to find that somebody else has already asked the same question. A couple things to note 1 - I've had trouble using JS and Caspio's checkboxes. Dropdowns are easier to work with. 2 - I never use 'onsubmit'. Rather i create a fake submit button that runs that code I need before the submit happens then wrap the function with: document.getElementById("Submit").click() ** If you must have something easier than a dro
  17. Hi everybody, i need to update a field i the database when a checkbox is checked here is my code but it's not working: <SCRIPT LANGUAGE="JavaScript"> function Updatestatus() { if (document.getElementById("approved").checked==true) { document.getElementById("status")="approved"; } else if (document.getElementById("approved").checked==false) { document.getElementById("status")="pend"; } document.getElementById("update as").onsubmit= UpdateQty; </SCRIPT>
  18. Hi, My current code is: <SCRIPT LANGUAGE="JavaScript"> function update() { var p2 = document.getElementById("cpParamVirtual10").value; document.getElementByName("cpParamVirtual4")[0].value=p2; } document.getElementByID('caspioform').onload=update; <SCRIPT> and I have it deployed in the footer of a submission form however it is not working. Virtual10 is a hidden field that loads with a passed parameter . Virtual4 is a cascading dropdown ( and on exit passed the parameter that virtual10 loads). I want to set the cascading dropdown to the value it was when the form was s
  19. When one of my end users fills out a form then need to use the barcode scanner. An example of the text would be "%247463$1$0$4$20%". My script below is suppose to extract everything after the first two characters up to the last character. It works but it is also showing the original along with it. <script> function modify() { //Store the value in the field to trim. var trim = document.getElementsByName("InsertRecordBarcode")[0].value; //Take a substring of trim and store it back into new trim value. trim = trim.match("%2(.*)%")
  20. Hi! I have multiple scripts for a submission page. When I execute the page I am only able to get one to work at a time. Not all three. I am not sure what I am doing wrong. Any help or advice would be appreciated. I have pasted the scripts below. I have all the scripts in the footer of the page. The first simply checks that the MOQ field is greater than the Inner Pack field. The second checks that cost is less than retail. They third, if the virtual check box is checked, it will copy the data from the Vendor VPN field to the Vendor Style field. <SCRIPT LANGUAGE="JavaScript
  21. So this is something that has been addressed a couple of different times but not of the Javascript solutions work for me. I have an update page that has 3 listboxes with multi-select enabled. I need the update page to display the multiple selections in the listbox separately and not in one long sentence separated by commas. Here are two of the different scripts I have tried to use, neither has worked. First: <script> // Function for selecting corresponding elements from the list box. function select_ (){ // get listbox element var o_els = new Array("EditRecordSt
  22. Hi I notice whenever I use javascript within caspio datapage and do a preview, it seems to work. However when I save my datapage and have it deployed to my web environment, the script does not work at all. Anyone know why and how I can fix this? Thanks in advance.
  23. In an html block on a Details datapage, I'm trying to show buttons with hyperlinks to social media pages using font awesome icons. The issue, though, is I need to show/hide these font awesome icons based on whether the datafield used for the url is null/blank or not. Basically, if the user has not entered a url link in the 'Facebook' field then I need to hide the Facebook font-awesome/hyperlink (because there is no url for Facebook for that record). I just want to show the social media links that have actual urls and hide those that don't. Here's the code to a couple of those hyper
  24. Hi Hope someone can help me out here with my javascript problem. I have a submission form (which is multi-step form, 2nd page of a form which is now a update form) which is collecting information like project type, project name, description. It is cascading from project type -> project name -> description Because I can't do a cascading text area for "description". I have created a virtual text field for this value hoping to copy this into the "description" text area. I am having no luck with javscript which I have modify from what i found on this forum. Ca
×
×
  • Create New...