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. Hi, I'm new to Caspio. I have a 9 date text fields with calendar picker. When user picks date for 1st field I need the subsequent 8 fields to populate with the 1st field's date + 1 business day. The result would be as follows: field 1 - 01/16/2015 SELECTED field 2 - 01/19/2015 AUTOPOPULATED field 3 - 01/20/2015 AUTOPOPULATED field 4 - 01/21/2015 AUTOPOPULATED field 5 - 01/22/2015 AUTOPOPULATED field 6 - 01/23/2015 AUTOPOPULATED field 7 - 01/26/2015 AUTOPOPULATED field 8 - 01/27/2015 AUTOPOPULATED field 9 - 01/28/2015 AUTOPOPULATED THEN SUBMIT* Any help, javascript and/or implementation would be greatly appreciated. Thanks.
  2. Hi, I have a form with 3 checkboxes. A visitor can select any checkbox to get the products they want: newspaper or magazine, both, or just one. --- The visitor can also select to get the e-newsletter, but only if the newspaper checkbox is selected. Else the e-newsletter checkbox is disabled (which is a rule set configured in the form that works fine). What I need.. is a function for if someone chooses both "newspaper" and "e-newsletter" checkboxes then decides that they don't want "newspaper" and deselect it (which leaves e-newsletter still checked). I need an onchange function that unchecks the "e-newsletter" checkbox at the exact same time newspaper is unchecked. Note - The exisitng rule makes the checkbox disabled and enabled, but it doesn't uncheck it. SAMPLE OF FORM: 1) [ ] Get this free newspaper /--> OC_news_print = id 1b) [ ] Get the e-newsletter too /--> OC_news_eletter = id 2) [ ] Get this different magazine -- SOMETHING LIKE CODE BELOW IS NEEDED - MINE / IT DOESN'T WORK --- <! -- vars NEEDED AT ALL ? var ocPrint = document.getElementById("InsertRecordOC_news_print"); var ocEnews = document.getElementById("InsertRecordOC_news_eletter"); --> function ocProductsCheck() { if (document.getElementById('InsertRecordOC_news_print').checked.length<1) { document.getElementById("InsertRecordOC_news_eletter").checked=false; } else { if (document.getElementById('InsertRecordOC_news_print').checked.length>0) { document.getElementById("InsertRecordOC_news_eletter").checked=false; } } document.getElementById("InsertRecordOC_news_print").onchange=ocProductsCheck; Thanks - Geoff
  3. I have a Single Record Update form where once a user has submitted data on Record #123, I want any other users subsequently trying to update Record #123 to be "locked out" from submitting via that form. In other words, I need to be able to disable a form after it's been used once, or when Some_Field = Whatever. You could just disable it with Rules, but if 2 people arrive on the form before either has submitted, then the 2nd User rewrites over the 1st User's data. I need to prevent that from happening. Caspio Support recommends: In order to prevent the next users to submit/edit the same record, the "timestamp check" should be done upon form submission. A solution would be to write a JavaScript function to perform the "timestamp check" and then call the function on the form submission event. Can anyone please assist with this? I'm JavaScript illiterate. Thanks!
  4. I am trying to get the freeze headers in tablular report script to work and am unable to get it working. I have followed the instructions at the link below but it is still not working. Has anyone had success in getting this script to work? It is for a tabular report in an iframe inside an Caspio HTML datapage. http://forums.caspio.com/index.php/topic/4678-j-freeze-header-in-a-tabular-report/
  5. Hello All! I am trying to figure out how to refresh an iframe from a popup window. I can do it when the popup is called from the main page (ADDing records), but I can't figure it out for a popup that is called from within the iframe (EDITing records). In addition to residing within an iframe the button to call the EDIT popup is a Caspio Data Page and is built from javascript during page load. Please consider the following scenario. (I removed classes, titles, and other irrelevant items for simplicity) Main Page: <div id="vehicles"> <div class="frmHeader"> <h2>Vehicles</h2> <a onclick="popupWindow('addVehicle.html')"></a><!-- ADD vehicle --> <a onclick="ifrRefresh('ifrVehicle')"></a> </div> <iframe src="lic/vehicle.html" name="ifrVehicle" id="ifrVehicle"></iframe> </div> Iframe Content html file: <div id="ifrContentVehicle" class="ifrContent killHeader"> <script src="/scripts/e1.js"></script> <script>try{f_cbload("***","http:");}catch(v_e){;}</script> </div> Iframe Content after load: <div id="ifrContentVehicle" class="ifrContent killHeader"> <form id="caspioform"> <div> <table name="cbTable"> <tbody> <tr> <td> <a onclick="popupWindow('editVehicle.html?VehicleID=*')"></a><!--EDITv--> ... Add Vehicle: <script> window.onunload = refreshParent; function refreshParent() { window.opener.ifrVehicle.location.reload(); } </script> This works to refresh my iframe named ifrVehicle. However, I cannot get it to work with the Edit popup. Any help will be greatly appreciated! CHAD
  6. Hi, I used two forum articles to get pretty far in fixing what Facebook sees on a details page that Caspio creates. Could you help me fix this so that specific product details are shown in the Facebook URL preview? I added a script based on Jan's suggestions in these articles and I need help to correct the javascript. http://forums.caspio.com/index.php/topic/4148-fieldsparameters-in-browser-tabs/?hl=%2Bpage+%2Btitle http://forums.caspio.com/index.php/topic/4297-facebook-open-graph-meta-tags/?hl=facebook When I add a caspio-related details page URL into a Facebook status, it automatically puts gobbledy gook instead of the content that I am trying to specify with OG code. Shown here: http://prntscr.com/5jxrw9 Page title Click here to load this Caspio online database. Click here to load this Caspio online database. Click here to load this Caspio online database. Click here to load this Caspio online database. Click here to load this Caspio online database. Click here to load this Caspio online database. From what I can tell, this is because of the embedded code when I use the Wordpress Caspio plugin. It looks like one of the problems is that Facebook believes it knows my canonical URL and is not looking at the product ID parameter to see what OG data is there. I want the data to be specific to each product page and not be generic. Here is what I put in the Header data page element. How can this be fixed? I don't see how to modify the Facebook OG code to conform to Jan's javascript provided. (https://developers.facebook.com/docs/payments/product) <style type="text/css"> #Mod0EditRecord, #Mod0CancelRecord{ display: none; } </style> <SCRIPT LANGUAGE="JavaScript"> window.onload= function() { document.title ="[@field:product_NAME] | [@field:product_MANUFACTURERorig] | Adjectivs"; head prefix= "og: fb: product: http://ogp.me/ns/product#" og:title ="[@field:product_NAME] | [@fild:product_MANUFACTURERorig] | Adjectivs"; og:type ="product"; fb:app_id ="259344627418443": og:url ="http://adjectivs.com/product-details-caspio/?product_Product_UID=[@field:product_Product_UID] />; og:image ="[@field:product_IMAGEURL]"; } </SCRIPT>
  7. I have a Reports-Details datapage and want to access some of the field values that are not on the associated html page (so I can't do, e.g., document.getElementById). Since there are a lot of fields I want to access at once, I'd rather not type out each one individually. So instead of alert('[@field:field1_name]'); alert('[@field:field2_name]'); ... alert('[@field:field100_name]'); I want to loop through an array of the field names like this var a = ["field1", "field2", ... , "field100"]; a.forEach(function(element) { alert('[@field:' + element + '_name]'); });
  8. I have a submission form with a couple of checkboxes. Ideally, it would be mandatory for one of the two checkboxes to be selected. However, my primary concern is that both checkboxes cannot be selected so I want to toggle off one when the other is checked. I have been playing around with other javascript code I have found on the Caspio forum but have not had any success getting it modified and working. Following is my attempted code on two checkboxes, one named "pure" and the other "mix". Any help for a javascript newcomer would be appreciated... <script type="text/javascript"> /* Get value of the Yes/No fields */ var cb_pure = '[@field:pure]'; var cb_mix = '[@field:mix]'; if (cb_pure == 'Yes') { /* make sure cb_mix is deselected */ document.getElementById("InsertRecordmix").checked=false; } if (cb_mix == 'Yes') { /* make sure cb_pure is deselected */ document.getElementById("InsertRecordpure").checked=false; } </script>
  9. Hi, I have been trying to figure out how to make my search results work. I have a product database that I want people to be able to search. The submission form has: one search field that allows people to type in brand names, materials, adjectives. Results show: Products that contain some or all of the words that were typed in. This is tied to a keyword field that includes lots of product descriptors. How do I change the logic and rules to make this work? Do I need to use Javascript to take the full string and separate each word into separate fields? The regular Caspio "or" logic doesn't work. Here's an example that might make more sense: People type in search results "gold shiny purple flowers" I want to be able to show products that contain gold or shiny or purple or flowers. Ideally the top of the search results include the most relevant products which might have all four words included. But, I want my gold shiny necklace to show up even if I don't have gold shiny flowers. Thanks! I don't know Javascript but I have been able to implement scripts when people give them to me. thanks for your help.
  10. Does anyone have a javascript that would insert the <li> tag at the beginning of each sentence entered into a text box? I am looking to get bullet points formatted on print view for multiple sentences entered into a text box.
  11. Hello; I would like to dynamically choose a lookup table for a dropdown list. Similar to a cascading dropdown, but where the actual lookup table changes. Consider the scenario... Parent Dropdown options: Opt1 & Opt2 When Opt1 is chosen viewOpt1 populates the child dropdown When Opt2 is chosen viewOpt2 populates the child dropdown I have a workaround envisioned that entails adding many fields to the lookup table, and i would prefer to not un-optimize my app by doing that. Does anybody know of a js that can help me with this? Thanks!!
  12. Hello, Does anybody know how to disable autocomplete on text input fields? THANKS
  13. Hi. I need to collect data from several different drop-downs, then combine the results into a single array in my data table. How would I do that? Example: If I collect 5 as the value for dropdown_1, and 3 for the value of dropdown_2, and 4 for the value of dropdown_3, I would need to be able to use that to create an array in another field (dropdown_values) such as: 5, 3, 4 I'm guessing this is a javascript thing. Any idea how to do that? Thanks for any help.
  14. I have a form that currently uses Dropdowns and want to change them to Radio buttons. Not a biggie, but I'm not sure what I need to change on my script to make it work. It seems that the radio button has 2 fields, so I think I have to somehow choose which is selected? I'm a bit of a novice, so any help would be greatly appreciated. Here is my current script: <SCRIPT LANGUAGE="JavaScript"> function calculate() { var v_q1 = parseFloat(document.getElementById("InsertRecordSec1Q1").value); var v_q2 = parseFloat(document.getElementById("InsertRecordSec1Q2").value); var v_q3 = parseFloat(document.getElementById("InsertRecordSec1Q3").value); var v_q4 = parseFloat(document.getElementById("InsertRecordSec1Q4").value); var v_q5 = parseFloat(document.getElementById("InsertRecordSec1Q5").value); var v_q6 = parseFloat(document.getElementById("InsertRecordSec1Q6").value); var v_Sec1total = (v_q1+v_q2+v_q3+v_q4+v_q5+v_q6); document.getElementById("InsertRecordSec1TotalScore").value = Math.round(v_Sec1total);
  15. I have a text field with id=TextField. When the user types 10 into this field I would like the font color of 10 to change immediately to red (and if possible change the background color of the text field). It seems the best way to do this is change the CSS style of TextField when 10 is entered into this field. I searched online but couldn't get any of the available code to work. Thanks.
  16. Need help in disabling the Enter Key from a text area in a Submission Form and an Update Form. Since I later on use that parameter to pass it on to another form and if the user used the Enter key, this passing of parameters results in an error. This is what I have on the header of the submission form but still is not working: <script language="javascript" type="text/javascript"> function stopRKey(evt) { var evt = (evt) ? evt : ((event) ? event : null); var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); if ((evt.keyCode == 13) && (node.type=="text")) { return false; } } document.onkeypress = stopRKey; </script> The field I want to prevent is named as: "[@Status_trial]" I will greatly appreciate the Help!
  17. Hi, I'm new to using Caspio bridge. I am more accustomed to creating web forms directly using PHP and JQuery, but I need to make some updates to a Caspio form. I have a submission form that has 4 text fields. The first 3 fields will accept currency values. The last field sum sum the previous one in real time. For example, if in field 1 I enter value 25, then 25 should show in field 4 when event focus changes. If fields 1 and 2 have values 25 and 17, respectively, then when the event focus changes from field 2 the value in field 4 should be 42. I know how to d9 this using straight JavaScript or J-Query, but I am having trouble creating functions and adding triggers and events to the elements in my submission form. Any help would be greatly appreciated.
  18. Hello I have two fields in my submission form - date and day. The customer selects date (via calendar pop up text field). I need the day field to automatically be populated by the day of the week from the date input (so someone inputs 25/12/2013 and the day field automatically says 'Wednesday' or whatever). Currently, I'm tackling this in a very roundabout way, by passing a long date to a report data page and then using rules (if date contains 'Monday' then hide section 1 etc). This is laborious and requires the user to click again on a url link. There must be an easier way. Does anyone know how? Ideally some javascript to just take the day of the week from the date field would be good. If that's not possible, then javascript that basically says "if [@field:date] contains 'Monday' then go to data page XXXXXXX" All help appreciated. Thanks Duncan
  19. Hello I'm a bit of a Caspio newbie and pretty unskilled (ok - very unskilled!) at Javascript. I have a couple of, hopefully small, issues that I assume I need some basic javascript to solve. I've tried adapting code that I've found elsewhere, but I don't really know what I'm doing:- 1.I have a field called 'maximum_people' and one called 'no_of_people'. I need to restrict the number of bookings received on a given date, so if I create a report datapage (filtering by date) I need to add up all the 'no_of_people' submissions, and then have the form stop if it >='maximum people'. I suppose I need something like- <script> if(SUM[@field:no_of_people] <[@field:maximum_people]) { document.write("<a href='http://b6.caspio.com/dp.asp?AppKey=504f20004a6cefd06ad94881b12c&Course_ID=[@field:Course_ID]'>Signup</a>"); } else { document.write("<p>Signup Closed</p>") } </script> 2.)The second thing is a simple block to ensure that no bookings are made before today (as the Caspio calendar allows any date to be selected, even in the past)- I guess it is sort of like- <script> if([@field:date] >="today") { document.write("<a href='http://b6.caspio.com/dp.asp?AppKey=504f20004a6cefd06ad94881b12c&Course_ID=[@field:Course_ID]'>Signup</a>"); } else { document.write("<p>Sorry, we can only take bookings from tomorrow onwards</p>") } </script> I'm flying blind though, and there are probably 101 better ways to achieve what I need. Hopefully someone can help... Duncan
  20. 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?
×
×
  • Create New...