Caspio Ninja
  • Content count

  • Joined

  • Last visited

  • Days Won

  1. Hello DesiLogi, I cannot check your script right now, so it is just my opinion. I think that your script does not works, because you use invalid names for inline fields. Please pay your attention, that prefix for inline insert fields is InlineAdd, and for inline update it is InlineEdit, but it isn't InsertRecord. Thanks
  2. Reload Main Page

    Hello Farnsbarnes, May you please place code below to you parent page, to "onmessage" event handler? Just replace "f.src = f.src;" to code below. I hope it will help. In case if it does not fix the issue with old data, can you please post link to you parent page? If it isn't acceptable, just send link to parent page to me via forum message. try { f.src = f.src.replace(/[&][t][=][0-9]+$/gi, '') + '&t=' + String(new Date().getTime()); } catch (e) { } Thanks
  3. Hello peterhanse, Password cannot be blank. If you didn't write any value when add new row, system will generate random password. Sure. Please add Header & Footer to your Update DataPage, and place code below to DataPage footer. Please pay your attention, that if user already did change own password, she open Update DataPage second time, and password fields will cleaned on page's load, it is required enter password every time when data will changed, Otherwise password will be override with random value. <script type="text/javascript"> var pwd = document.getElementById('EditRecordPwd'); //place real ID here if(pwd){ pwd.value = ''; } var pwdc = document.getElementById('EditRecordPwd@Confirm'); //place real ID here, but keep @Confirm suffix if(pwdc){ pwdc.value = ''; } </script> I'm not sure which kind of issue you have with it. Please edit your DataPage, go to "Fields configuration", select you password field(s) and uncheck "Require current password validation". Thanks
  4. Reload Main Page

    Hello Farnsbarnes, Yes, you can. For reload particular iframe, you need to correct your code. On your parent page, in "onmessage" event handler replace line below location.reload(); to several new lines var f = document.getElementById("Frame2"); //Set real id f.src = f.src; Thanks
  5. Datapage Display

    Hello AndyWallace, Yes, it is possible. You can choose between predefined criteria Report DataPage and Direct to Details DataPage. In both cases you just need select specific search type - "filter data based on your pre-defined criteria". In this case you can pre-configure and static values for criteria or set up DataPage to receive external parameters. Please see for more details Thanks
  6. Reload Main Page

    Hello Farnsbarnes, Can you tell me please, do you use different domains for parent page, and for iframe? If yes, proposed solution cannot works due to security restrictions. Can you please open browser console, and look for some run-time errors, when you submit form in iframe? Can you see some error with similar text? "SecurityError: Blocked a frame with origin..." If you have similar error, you can use some different technique based on messages. Please pay your attention that it will works in modern browsers only. You can see list of supported browsers here Add code below to header on your parent page: window.onmessage = function (e) { if ( === "refresh") { location.reload(); } }; Add code below to footer in your DataPage, which will open via iframe. <script type="text/javascript"> document.getElementById("caspioform").onsubmit = function () { if (window.parent && window.parent.postMessage) { window.parent.postMessage("refresh", ""); //put your own domain here } } </script> Thanks
  7. System error. (Caspio Bridge error) (5)

    Hello MTF, Can you tell me please, which kind of deployment method do you use? Embed? Also please tell me which kind of data type your field has. Thanks
  8. Passing Internal Parameter To Popup

    Hello Farnsbarnes, Please see example below. If user will select one or more values from Select control, and will click "Open" button, all values will be passed to popup page. According to your questions: >> should I attach [@sitelink] , or the field name, to the parameter? You should use [@sitelink] parameter to build proper URL to popup page. I.e. [@sitelink] + '?prm1=123&prm2=456. If you already have question mark in [@sitelink], just replace it ampersand (&). >>being a virtual field, should it be written as cbParamVirtualfield Yes. Please look at following post for more details. You can see example here Parent page <script type="text/javascript"> var states = []; var abc; function f_OpenPopup() { //reference to popup window var popup; //link to popup page var url = '[@app:popupUrl]'; // put parameter instant of string literal var queryStarted =\?/g) > -1 ? true : false; //build query string based on user's selection var query = f_GetQueryStringForMultiple(); //check that query string not empty if (query) { //open popup and pass some parameters to it popup = + (!queryStarted ? '?' : '') + query); // do something when popup will be closed popup.onbeforeunload = function () { alert(abc); } } } function f_GetQueryStringForMultiple() { var ctrl = document.getElementById("Value1_1"); //Change it to actual field Id var q = ""; if (ctrl) { for (var i = 0; i < ctrl.options.length; i++) { if (ctrl.options[i].selected) { q += (i > 0 || queryStarted ? "&" : "") + "prm=" + encodeURIComponent(ctrl.options[i].value); states.push(ctrl.options[i].value); } } } return q; } </script> Popup page <script type="text/javascript"> if(window.opener && !window.opener.closed) { // get reference to input on parent page var pc = window.opener.document.getElementById("def"); // set some value to input if (pc) { pc.value = 200; } // set some value to variable = 100; document.write('Following states were select on parent page: ' + window.opener.states.join(', ')); } </script> Thanks
  9. Passing Internal Parameter To Popup

    Hello Farnsbarnes, I'm not sure that I understand correctly what you would like to achieve, but let me explain overall case, how to pass parameter between parent page and popup. And your last code example does not makes sense, because you try use not variable, but string literal. 1) To pass parameter to popup you can add it to query string <!DOCTYPE html> <html lang="en" xmlns=""> <head> <meta charset="utf-8" /> <title></title> <script type="text/javascript"> var abc; function foo() { //open popup and pass some parameter to it var popup ='/a/b.html' + '?prm=' + abc); // do something when popup will be closed popup.onbeforeunload = function() { alert(abc); } } </script> </head> <body> <input type="button" value="Open" onclick="foo();" /> <input id="def" type="text" value="" /> </body> </html> 2) Pass some values from popup to parent page <script type="text/javascript"> if(window.opener && !window.opener.closed) { // get reference to input on parent page var pc = window.opener.document.getElementById("def"); // set some value to input if (pc) { pc.value = 200; } // set some value to variable = 100; } </script> Thanks
  10. Save As Type

    Hello asimmons, Bridge always creates Excel XML file, when you choose "MS Excel Spreadsheet (XML)" as file format. I think your user has some issue with file associations. Can you ask she try repair Office installation? Thanks
  11. Seo Friendly Urls

    Hello aukinfo, No, it isn't possible. But you can create feature request on IdeaBox site Thanks
  12. Hello wgalliance, HTML element "form" doesn't have "onchange" event. Also after change variable "a" you didn't set it back to "value" property of input element. Please add this script to footer of authentication which you use. <script type="text/javascript"> function nophyphen() { var ctrl = document.getElementById("xip_UserId"); if (ctrl) { ctrl.value = ctrl.value.replace(/-/g, ""); } } var xip = document.getElementById("xip_UserId"); if (xip) { xip.onchange = nophyphen }; </script> Please pay your attention, that you need to change "xip_UserId" to correct name of your field. You can see example below Thanks
  13. Hello egilley, It is a bit late, but I would like add some comments. >>I'm so sorry, but I don't understand what you're showing me and how it will help me with the javascript and getting the statement I want to drop into a hidden field I did show to you example, which write something to hidden field if value in specified field meet some conditionals If you open details page for record with ID 1, nothing happened, because value of Int32 record equal zero. But if you will open any other records, you will see some message, generated via script. As I understand it is exactly what you would like to achieve. >>it seems I can't use "EditRecordNameofField" unless the field is an active field within that datapage Excuse me, but it isn't correct. All DataPage's field, include all hidden fields, follow name convention described above. So, on Submission DataPage all customer's field have prefix InserRecord, and on Update\Details page all customer's fields have prefix EditRecord. There is only one exception - on Update\Details DataPage Display Only fields don't have input element at all, but they have it on Submission DataPage. Probably you got some another issue with script. Glad to see that your issue was resolved. May be this link also will helpful for you Thanks
  14. Hello egilley, I'm not sure what kind of issue you got with details DataPage, but quick example, which I create myself, works for me. Please see link to similar DataPage below For make sure that we on same page, may you please post link to your DataPage? I will look on it, and will try figure out how I can help to you. Thanks
  15. Hello egilley, According to your last question - hidden fields are hidden fields on any type of DataPages. Every time they translated to regular HTML elements (<input type="hidden" />) According to your first question, I think there is some data type issue. Please pay your attention, that following code will create string variable, but not numeric var issue5a = '[@field:issue_5_a]'; But below you are trying use it as numeric variable if (issue5a > 0) { Please try change initialization of "issue5a" variable to following var issue5a = Number('[@field:issue_5_a]'); Hope it will help. Thanks