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 originally had two fields for my Orders App - Quantity_Ordered and Quantity_Received. When our receiving department gets the materials from the orders in, they select an area it is going to be stored. I now have created two new fields - Quantity_Stored and Quantity_Sent. Quantity_Stored is suppose to get its initial number from Quantity Received. So, if we received and stored 4 windows, Quantity_Stored will start at 4. Quantity_Sent is for when we actually send those materials from our shop where it is stored to the job site. Many times we only send parts of the order at a time. I'm trying to figure out how to make Quantity_Stored a formula that is the initial Quantity_Received - Quantity_Sent. However, I am trying to make Quantity_Sent be empty in the table and just execute the formula from the datapage. I.E. - 5 windows received. All 5 stored in bin A2 in our shop. Our Quantity_Stored is for that order is now 5. In the datapage, the user enters 2 into the Quantity_Sent, and the Quantity_Stored is updated to 3. We repeat the process on a future date, but only send 1 window this time. I don't want Quantity_Sent to be populated with 2 already this time, I just want the user to be able to put in 1 more sent instead of doing the math to put in that 3 have been sent all together. Thanks, KPC
  2. I am using a submission form and trying to customize it. It's a simple script that displays a warning message and stops submission, if a user makes a certain combination of selections(i.e. selects ABC from a dropdown and XYZ is calculated in the Virtual field. However, the code does not seem to work. Could somebody take a look and let me know what I am doing wrong? The UseCaseType is a dropdown with a lookup table linked to it, and the Virtual Parameter is a Calculated Value SQL script(that does work). For some reason, a and b are populated as nulls. <script> document.addEventListener('BeforeFormSubmit', function (event) { var a = document.getElementById("InsertRecordUseCaseType").value; var b = document.getElementById("cbParamVirtual2").value; alert('a is ' + a + ' | b is ' + b); if (a == 'ABC' && b == 'XYZ') { alert('You cannot select ABC and XYZ together'); event.preventDefault(); } }); </script>
  3. I would like to ask for help in my JS code. I'm trying to change the value of a checkbox in a search form when a specific option in a dropdown is selected. I want the checkbox to be set to true if "Math" is selected in the dropdown. Below is my code that's not currently working: <script> function checkdropdown(){ var drpselected = document.getElementsByName("Value1_1").value; if (drpselected == "Math") { document.getElementsByName("Value2_1").checked = true; } else { document.getElementsByName("Value2_1").checked = false; } } document.getElementsByName("Value1_1").onchange = function() {checkdropdown()}; </script> Also, here is a screenshot in the "Configure Search Fields" step of the DataPage: I'm hoping someone can help me with this. Thank you.
  4. Hello, I have been using the following code in the footer of a details data page. It previously worked to concatenate an autocompleted value from a virtual field with a text area field called "associatedSpecies." This is based on the javascript solution from Caspio below, but I'm not sure if this is no longer supported by more recent browsers? Does anyone have any insight on how I might make this work again? <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var x0 = document.getElementsByName("EditRecordassociatedSpecies")[0].value; var x1 = document.getElementsByName("cbParamVirtual2")[0].value; if (x0 && x1) { document.getElementsByName("EditRecordassociatedSpecies")[0].value = x0+"; "+x1; } else { document.getElementsByName("EditRecordassociatedSpecies")[0].value = x0 + x1; } } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT>
  5. Hi all, I cannot seem to overcome an issue with the use of Javascript on a bulk edit screen. There is a basic little script I wrote to control when users should be notified about changes done in bulk. It should simply prevent notifications from being sent if the user did not alter the initial delivery status of a product. While the script itself executes just fine upon each change to the delivery status field, the value that gets inserted into the text field which toggles the actual notifications isn't being saved when I hit "Update". It works if I manually type in Yes or No, but not if it's done via the script. I suspect this has to do with Ajax in one way or another, about which I lack the necessary knowledge to troubleshoot, unfortunately. var pSDeliveryOld = document.getElementById("BulkEditParticipation_List_2016_Delivery_status").value; var dStatusChangeNotification = document.getElementById("BulkEditParticipation_List_2016_Notification_DStatusChange"); function statusCheck() { var pSDeliveryNew = document.getElementById("BulkEditParticipation_List_2016_Delivery_status").value; if(pSDeliveryOld !== pSDeliveryNew) { dStatusChangeNotification.value = "Yes"; } else { dStatusChangeNotification.value = "No"; } console.log("System to send notification: " + dStatusChangeNotification.value); } document.getElementById("BulkEditParticipation_List_2016_Delivery_status").onchange = statusCheck; Could one of you experts out there help me get the Yes/No value saved in the table? Many thanks in advance! Best, Kristof
  6. Hello. I have a submission form with a popup link. The form has a Job dropdown element that is being used as a parameter to pass to the popup. When a Job is selected from the dropdown and the popup link is clicked, a List Report pops up and shows records related to the Job that was selected. This works great. However, I need an element in the form to be cascading, and the Job dropdown has to be the parent field for this. When I enable the cascading feature, my popup stops working. I get an Uncaught TypeError of null, stating that the parameter field name cannot be found. So, Job can be found before it is made a parent field for a cascading element, but once it is made the parent field, it stops working. Here is my code. <script> var fieldName = "Job"; // The name of your table field. var paramName = "Job"; // The name of your parameter /* No modifications necessary beyond this line */ var inputField = document.querySelector('[action*="[@cbAppKey]"] #InsertRecord' + fieldName); var linkToChild = document.querySelector('[action*="[@cbAppKey]"] #linkToChild'); var baseUrl = linkToChild.href; //do not touch var moddedUrl = baseUrl; //do not touch function updateLink() { moddedUrl = `${baseUrl}?${paramName}=${this.value}` } ['change', 'keydown','keyup'].forEach( function(e) { inputField.addEventListener(e, updateLink); }); inputField.dispatchEvent(new Event('change')); linkToChild.onclick = function() { window.open(moddedUrl, '', 'resizable=no,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no'); return false; } </script> Any help would be appreciated. This is maddening me, haha.
  7. Contained in this HTML block are two options:Google Doc<br />&nbsp; &nbsp;<a href="[@field:Employee_Document_Link]" target="_blank"><img alt="File Quick View" src="http://account-ability.net/webapps/hca/images/Entypo_e731(1)_32.png" style="width: 32px; height: 32px;" /></a><br /><br />Uploaded Doc<br />&nbsp; &nbsp; <a href="https://c0axa147.caspio.com/dp/76292000e18ad3e841834930b209?Employee_Document_ID=[@field:Employee_Document_ID]" target="_blank"><img alt="File Quick View" src="http://account-ability.net/webapps/hca/images/Entypo_e731(1)_32.png" style="width: 32px; height: 32px;" /></a>The user clicks on either of the document icons. What I am trying to achieve is for the "Google Doc" icon to show only when the [@field:Employee_Document_Link] is not empty the and "Uploaded Doc" icon to only show when the [@field:Employee_Document_Upload] is not empty. Would very much appreciate any help in this.
  8. I have used the forum to get to this point so you may have seen some of my code that I grabbed from other posts. I have a single record update form, where I only want them to be able to select the update button if all of the fields are marked as 'complete'. It should be known that all of the 'complete' or 'missing data' fields are formulas in the table, however, I am referencing virtual fields in my code that are set to the formula fields. The url to my form is here: https://c5amf675.caspio.com/dp/32576000f879393a309d4a97b1bd My code for checking the virtual field values is here: <script language="JavaScript"> function check_numbers() { var disabled = false; if (parseFloat(document.getElementById("cbParamVirtual").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtua2").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual3").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual4").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual5").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual6").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual7").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual8").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual9").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual10").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual11").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual12").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual13").value)=='Complete') disabled = true; if (parseFloat(document.getElementById("cbParamVirtual14").value)=='Complete') disabled = true; if (disabled) { alert("All fields must be complete"); return false; } } document.getElementById("caspioform").onsubmit=check_numbers; </script> What is really weird, is that even the following code will not show a message when I click on the update button. <SCRIPT LANGUAGE="JavaScript"> function check() { window.alert("Thank you.. Information is registered!"); } document.getElementById("caspioform").onsubmit=check; </SCRIPT> I tried this small alert function after I couldn't get my regular code to work. This was on its own and did not work. I am thinking that there is an issue somewhere where the onclick is not registering. Do any of you have any idea what might be the problem?
  9. Hello everyone, I am trying to create a submission form with four fields, NAME, EMAIL, CONTACT PERSON and RESUME(File Data type). Now I want to have a user interaction that will confirm if the user wants to proceed when he/she submit a record. e.g. "Are you sure you want to apply for this Position?" Any help would be much appreciated. Many Thanks!
  10. I have an update record data page, where I want to stamp a UTC date in a field. Caspio does not allow calculated values on an update record data page, so I need to use Javascript to do it. If anyone knows how to do it, please let me know by sharing the javascript needed to accomplish the task. I will be happy to tip whomever provides the first useful answer with NavCoin. You may get a NavCoin wallet on Navcoin.org. Thank you.
  11. Years ago I added some JavaScript to my forms to prevent clients from selecting a "due date" that isn't at least two weeks in the future. Recently that code has stopped working, and all submissions are allowed through, regardless of the date selected. I think this may be tied to the recent Caspio updates. At least, that's all that I can see; the forms themselves haven't changed. Below I'm pasting my JS, which resides in the footer area of my forms. Any ideas would be greatly appreciated. Thanks! (BTW, I know two weeks is 14 days, not 13. But my users don't seem to recognize that, so I made this small allowance.) <SCRIPT LANGUAGE="JavaScript"> function check_date() { var entered_value = document.getElementById("InsertRecorddateNeeded").value; var entered_date = new Date(entered_value); var two_week_date = new Date(); two_week_date.setDate(two_week_date.getDate() + 13); if(entered_date < two_week_date) { alert("Must be at least 2 weeks in future"); return false; } } document.getElementById("caspioform").onsubmit=check_date; </SCRIPT>
  12. I have an aggregated tabular report. Once I expand all the columns, I would like the data in one of the columns become links (using JavaScript). Please refer to the attached image. In this case I would like the data in the column EVENTO become links. Thanks!
  13. What I am trying to accomplish in my details report data page is to Sum the weight of each product. s1 = product ID for the first item in the sale s1w = product weight or units for the first item in the sale I can not just sum all my "sw" fields because each one could possibly be tied to a different product. I have come up with the following JS solution, which is intended to run when an HTML button is clicked. Here is what I have: In an HTML block at the top of the page: <input type="button" value="product 1 weight" onclick="prod1w()" /> In the footer of the page: <script> function prod1w() { var v_s1 = parseFloat(document.getElementById("InsertRecords1").value); var v_s2 = parseFloat(document.getElementById("InsertRecords2").value); var v_s3 = parseFloat(document.getElementById("InsertRecords3").value); var v_s4 = parseFloat(document.getElementById("InsertRecords4").value); var v_s5 = parseFloat(document.getElementById("InsertRecords5").value); var v_s6 = parseFloat(document.getElementById("InsertRecords6").value); var v_s7 = parseFloat(document.getElementById("InsertRecords7").value); var v_s8 = parseFloat(document.getElementById("InsertRecords8").value); var v_s9 = parseFloat(document.getElementById("InsertRecords9").value); var v_s10 = parseFloat(document.getElementById("InsertRecords10").value); if (v_s1 == 1) { var v_prod1s1w = parseFloat(document.getElementById("InsertRecords1w").value); } else { var v_prod1s1w = '0'; } if (v_s2 == 1) { var v_prod1s2w = parseFloat(document.getElementById("InsertRecords2w").value); } else { var v_prod1s2w = '0'; } if (v_s3 == 1) { var v_prod1s3w = parseFloat(document.getElementById("InsertRecords3w").value); } else { var v_prod1s3w = '0'; } if (v_s4 == 1) { var v_prod1s4w = parseFloat(document.getElementById("InsertRecords4w").value); } else { var v_prod1s4w = '0'; } if (v_s5 == 1) { var v_prod1s5w = parseFloat(document.getElementById("InsertRecords5w").value); } else { var v_prod1s5w = '0'; } if (v_s6 == 1) { var v_prod1s6w = parseFloat(document.getElementById("InsertRecords6w").value); } else { var v_prod1s6w = '0'; } if (v_s7 == 1) { var v_prod1s7w = parseFloat(document.getElementById("InsertRecords7w").value); } else { var v_prod1s7w = '0'; } if (v_s8 == 1) { var v_prod1s8w = parseFloat(document.getElementById("InsertRecords8w").value); } else { var v_prod1s8w = '0'; } if (v_s9 == 1) { var v_prod1s9w = parseFloat(document.getElementById("InsertRecords9w").value); } else { var v_prod1s9w = '0'; } if (v_s10 == 1) { var v_prod1s10w = parseFloat(document.getElementById("InsertRecords10w").value); } else { var v_prod1s10w = '0'; } var v_prod1w = v_prod1s1w + v_prod1s2w + v_prod1s3w + v_prod1s4w + v_prod1s5w + v_prod1s6w + v_prod1s7w + v_prod1s8w + v_prod1s9w + v_prod1s10w; document.getElementById("InsertRecordprod1w").value = (v_prod1w); } </script> Update: The problem was that the Element ID in this data page is EditRecord, I changed that out but am now running into a different issue. I am going to have about 20 different product ID's. I started to expand on this and added a second product ID function code segment. My buttons are working and values are coming into my prod1w and prod2w fields. However, something is going wrong in the calculation. The attachment shows whats happening. Based on what was entered here prod1w and prod2w should be 11.5 To add to the confusion, when products are entered in order (so s1,s2 and s3 = 1) the code works and you get the correct answer. However that is not how users will be submitting the information. I tried adjusting the else values from '0'; to just 0; but that broke it. I tried changing this line to: document.getElementById("InsertRecordprod1w").value = math.round(v_prod1w); Which lead to the same results. Any ideas? Any and all help is greatly appreciated.
  14. I'm sorry for what is probably a simple question. If I want to use data from a view (ideally - or a table if I had to), making it accessible to a javascript charting library (like d3.js) , how do I export it (or make it real-time accessible) as a json file without jumping through a bunch of hoops? For some reason I'm not making the connection... Thanks so much! Clint
  15. Can any buddy help me i need to add $ symbol on product_price and sub_total.. <script> $( document ).ready(function() { $(document).on("input paste keyup", ".product_qty", function( event ) { var product_quantity = 0; var product_price = 0; var gst_amount = 0; var sub_total = 0; var total_qty = 0; var grand_total = 0 product_quantity = $(this).val(); product_price = $(this).parent().prev().html(); sub_total = product_price * product_quantity; $(this).parent().next().html(sub_total); $('.product_qty' ).each( function( k, v ) { product_quantity = parseInt ( $(this).val() ) ? parseInt ( $(this).val() ) : 0; product_price = parseFloat($(this).parent().prev().html())?parseFloat($(this).parent().prev().html()):0; console.log(product_quantity); console.log(product_price); sub_total = parseFloat ( product_price * product_quantity ); console.log(sub_total); total_qty +=product_quantity; grand_total += sub_total; }); if ( grand_total > 0 ){ gst_amount = ( grand_total * 6 ) /100; } $("#total_qty").html(total_qty); $("#total_amount").html(grand_total); grand_total +=gst_amount; $("#gst_amount").html(gst_amount); $("#discount_amount").html(0); $("#grand_total").html(grand_total); }); // $(document).on("click", ".delete", function( event ) { var cart_item = 0; $(this).parent().parent().remove(); cart_item = $('.product_qty').length; if ( cart_item <= 0 ) { $("#total_qty").html('0'); $("#total_amount").html('0'); $("#gst_amount").html('0'); $("#discount_amount").html(0); $("#grand_total").html('0'); } else { $('.product_qty').trigger('keyup'); } }); }); </script>
  16. Hello.. I have a tabular report that will not recognize an element using document.getElementById( "elmName" ) (loctated in the Header of a report), if the datapage is deployed using ASYNC deployment... <script type="text/javascript" src="http://b4.caspio.com/dp/d6a9blahblah/emb"></script> returning a console message " VM3106:22 Uncaught TypeError: Cannot set property 'innerHTML' of null". If i put the script in the console as.. document.getElementById( "elmName" ).innerHTML = '<a href="httpcodehere">Test Button</a>'; the script runs without errors and replaces the html in the <div id="elmName">Original Text</div>.I have found if I use the legacy deployment .. <script type="text/javascript" src="https://b4.caspio.com/scripts/e1.js"></script> <script type="application/javascript">try{f_cbload("d6a9blahblah","https:");}catch(v_e){;}</script> the script runs document.getElementById without errors. (I have tried running this script in other tabular report datapages deployed asynchronously all with the same error and results. Then switching them to legacy deployment and the script runs without error.) Can anyone give me any insight on why the document.getElementById will not work if the datapage is using ASYNC deployment?
  17. Hi there, I have a details report datapage, where users can update information in this page. I'd like to somehow determine what has been updated every time this page is accessed, without having to list all of the fields. Caspio support suggested I do this using triggered actions, but I can't see how this is doable as there's no way to check if an element has changed, and it would mean specifying each individual field. I feel like this should be doable in JavaScript, but can't quite figure out how. My datapage reads from the table Card, but auto updates a separate table called Card_comments_and_updates, so I'd like the script to add a comma separated string to pass as a parameter listing all the field names that have changed, to this second table. Can anyone help me with this, please? TIA! Nikki
  18. Good Morning, I'm using a bulk edit on a tabular search and report. I've noticed that my Cascading drop-downs in the bulk edit show blank entries when there in no data for the filed being edited in it's own table. I have a view set-up to filter out blank entries in the table being used for value purposes; however unless the field has data in its own table it still shows a blank. I found the following code for standard drop downs but haven't found any information for cascading drop downs used in the bulk edit. Hoping someone can assist with code updates. All my attempts have been unsuccessful. Thanks...Bre <SCRIPT LANGUAGE="JavaScript"> <!-- Function removeBlanksInDropdown searches for blank entries and removes all occurrences. It is advisable to use this script with the "Show distinct display options" checkbox checked in the dropdown configuration in the Caspio Bridge DataPage Wizard --> function removeBlanksInDropdown() { /* dropdown stores the value of the dropdown form element reference in the DataPage. */ var dropdown = document.getElementsByName("Value1_1"); for (var q = dropdown[0].length-1; q >= 0; q--) { if (dropdown[0].options[q].value == "") dropdown[0].remove(q); } } document.addEventListener('DataPageReady', removeBlanksInDropdown); </SCRIPT>
  19. Hi Guys, I am Lee Hnetinka, What are some of the best reference sites for CSS and JavaScript? Please help me
  20. Hi there, I have records called Cards, which span 5 different stages. If the first part of the Card is completed, the user is in stage 1. If the first and second part is completed, they are in stage 2 etc etc. I'd like to automate this (currently they can choose their own stage via a dropdown), and have written the following script, but it's not working. <script> var count_Brief= ("[@field:Brief]").length; var count_AnalystNotes = ("[@field:Analyst_Notes]").length; var count_RecTest = ("[@field:Recommended_test]").length; var count_Result= ("[@field:Actual_result]").length; if (count_Brief > 1) { document.getElementById("EditRecordStage").innerHTML = "2. Brief"; } else if (count_Brief > 1 && count_AnalystNotes > 1) { document.getElementById("EditRecordStage").value = "3. Analysis"; } else if (count_Brief > 1 && count_AnalystNotes > 1 && count_RecTest > 1) { document.getElementById("EditRecordStage").value = "4. Test"; } else if (count_Brief > 1 && count_AnalystNotes > 1 && count_RecTest > 1 && count_Result > 1) { document.getElementById("EditRecordStage").value = "5. Result"; } else { document.getElementById("EditRecordStage").value = "1. Question"; } </script> Does anyone have any insight here? Many thanks Nikki
  21. So I am trying to limit a user from selecting an entry using an autocomplete (or I guess could be a dropdown). This user entry field is using a column in a table as the source. This is a complete list with all possible selections available (no replicates, and they are unique). The user selects 3 selections on a weekly basis (Pick1, Pick2, Pick3) and the items are entered into the Pick table. The catch is that the user CANNOT pick any of the previous selections from the previous week in the current submit week. So I have created a formula in the Pick table to concatenate all 3 picks each week for a user into one field. And I have been able to use this concatenated field in a RULE to at least warn the user that they are making an illegal choice. However, I cannot remove the previous picks from the source table to make that not even available for selecting. And I cannot prevent the user from still click the submit button (unless there is a way to implement a RULE to hide submit button until user fixes their selections...) So I am wondering if there is a way to remove the previous picks from the users options to select. These picks (text255 fields) also have an accompanying ID with them. And these text values are also unique, I enforce this. Example is the user is supposed to select 3 numbers from a table populated with the numbers 1 to 20. They cannot select the same number in the same session. So they select 1, 2, 3 in week 1. Now in week #2, they can select ANY 3 numbers (no repeats again) EXCEPT 1, 2, 3. So can the numbers 1, 2, 3 be removed from the dropdown (or autocomplete list) for just week 2. They are legal choices in week 3, but now week 2's number selections are "illegal". Each user will have the same situation, and the datapage is authenticated and I use the USERID. Thanks in advance
  22. 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
  23. 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 the standard 'data has been updated' message. So it seems to me I could put some kind of 'close window' function in the above js and put that in the 'message' section of the Destination wizard. I tried the below but it doesn't actually close the window/tab. <SCRIPT LANGUAGE="JavaScript"> function myFunction() { alert ('Your updates have been saved'); window.close(); } document.getElementById("caspioform").onsubmit = myFunction; </SCRIPT> Basically, I need, on Submit, the tab/window to close and a message to pop up saying data has been saved. Does anyone know how to do this?
  24. Hi, I have an html block in a Details page where I'm trying to show/hide a div based on the value of a Virtual field. The virtual field is set to Hidden and gets an Authentication value on load for data (a country name, in this case). I can't quite get the show/hide to work. I've used this code before and it works well so there must be some syntax mistake in this example. Does anyone have an idea with that might be? Thanks! <div id="section1">Print AUS Version</div> <script> var v_virt = document.getElementByID("cbParamVirtual13").value; if(v_virt=="Australia") { document.getElementById('section1').style.display = "block"; } else { document.getElementById('section1').style.display = "none"; } </script>
  25. Hi I am re-using a javascript code I have used many times successfully in the past, but I can't seem to get it to work now. It DOES work when I preview the datapage, but on the live website it does not. I am using a conditional display that I have confirmed still works on other live websites, it was copied directly from a datapage that is currently working but I switched out the field using field picker and the image link... <script> var link_text="[@field:Make]"; var src_address="https://banjimmie.weebly.com/uploads/2/8/3/6/28360873/chevy_orig.png"; var image_to_display='<a href="' + link_text + '"><img src="' + src_address + '"></a>'; if (link_text=='Chevrolet') { document.write(image_to_display); } </script> Previewing this directly from the datapage WORKS. Viewing on my live website DOES NOT. I use Weebly, and this code still works on all my other weebly sites for other pages. I am very confused. I use a hidden page on weebly to view the image rather than uploading to Caspio. This works on my other sites. thanks melissa
×
×
  • Create New...