Jump to content

Olfa

Members
  • Posts

    6
  • Joined

  • Last visited

  • Days Won

    1

Olfa last won the day on May 19 2016

Olfa had the most liked content!

Olfa's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. Hi Kmlgd, i think the problem is that the variable are not taking the values of your fields, you have to replace " the getElementById " by "getElementsByName" like bellow <SCRIPT LANGUAGE="JavaScript"> function calculate() { var entrada = parseFloat(document.getElementsByName("InsertRecordHora_Entrada")[0].value); var salida = parseFloat(document.getElementsByName("InsertRecordHora_Salida")[0].value); var total = (salida - entrada); document.getElementsByName("InsertRecordHoras_Trabajadas")[0].value = Math.round(total); } document.getElementById("caspioform").onsubmit=calculate; </SCRIPT> hope this would help Olfa
  2. Hi, i think you forget the " s " in getElementsByName("cbParamVirtual5")[0].value; and if you want to check if the variable x is taking the good value you can write: alert ( x ); //alert show a popup with the value of x, //you can use this function to test your code whenever you have a problem of values. // don't forget to remove the alert when you get it to work Olfa
  3. setInterval is going to execute your ReloadParent function evry 3 second. in order to reload the parent page only once you have to use setTimeout function. Or you can simply use the code bellow <script> myFunction() { window.parent.location.reload(); } document.getElementById("caspioform").onsubmit=myFunction; </script> Olfa
  4. Hi, in a report page, i have my table that contain some documents. When i select a document, i have some fields change values in back ground (thanks to window.open with an autosubmit) and then the user is invited to click on a button (in the table of documents) to set a checkbox to true that mean "this document is controled". as this far evry thing is okay My problem is , if in somehow the page is closed or refreshed before the user click the button, the document will be lost from this table (because the fields used in search have changed) and also in other tables that show only the controled documents. I tried to use the function onbeforeunload to block the close event with a warning popup, but the window.open (to change back the fields that i have changed them automaticly) is not executed window.onbeforeunload = function () { if ([@field:myFieled] == "true") { window.open("URL", " "); return 'if you close the window your document will be lost'; } }; If any one could help me how to make that window.open be executed or any other idea would be appreciated. Olfa
  5. Hi, I assume that you are using HTML block, so , in the style sheet of Caspio you can found that under the HTML Tags (in the bottom of the menu) it seems that u set a <h2></h2> you can adjest it there, or simply add and adjust the colors: <style> .h2{ background-color: #FFFFFF; color: #000000} </style>
  6. Hi Elena, if think that you just have to change the on load by onsubmit like this: <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var x = '[@calcfield:44]'; document.getElementById("EditRecordNew_Job_Grade").value = x; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> Olfa
×
×
  • Create New...