Forum Discussion
TaraTara
11 years agoQrew Member
I want this to work so bad, but it's still not working for me. Here is a break down of what I"m doing. If anyone can help, I would REALLY appreciate it.
1.) I created a new text page called module.js with the code below
(function(){
var querystring=document.location.search;
if(/a=er/i.test(querystring)) {
$("#_fid_341").attr("readonly", "readonly");
var label, oldValue, newValue, log;
$("#_fid_339, #_fid_328, #_fid_203, #_fid_103, #_fid_318", #_fid_27, #_fid_170, #_fid_28).on("change", function() {
log = [];
_.each([339, 328, 203, 103, 318, 27,170, 28], function(fid) {
oldValue = $("[name=_fid_oval_" + fid + "]").val();
newValue = $("#_fid_" + fid).val();
if (oldValue != newValue) {
label = $("label[for=_fid_" + fid + "]").text();
log.push(label + " was =" + oldValue + "; now =" + newValue);
}
});
$("#_fid_341").html(log.join("\n"));
});
2.) I created two variables...
The first variable is named "iol" and contains the following:
<img qbu='module' src='/i/clear2x2.gif' onload="javascript:if(typeof QBU=='undefined'){QBU={};$.getScript(gReqAppDBID+'?a=dbpage&pagename=
The second variable is named "/iol" and contains the following:
&rand='+new Date().getTime())};">
3.) In my projects table, I have created a multi line text field called [Change Log]. The field id for this field is 341. Input type is "User Input". I have the box checked for "Allow some HTML tags to be inserted in the field". I have checked "Log the edits to this field, and show them on forms".
4.) In my projects table I have created a formula text field called [-]. The field id for this field is 377. I have checked the box to allow some HTML. The formula for this field is below:
[iol] & "module.js" & [/iol]
1.) I created a new text page called module.js with the code below
(function(){
var querystring=document.location.search;
if(/a=er/i.test(querystring)) {
$("#_fid_341").attr("readonly", "readonly");
var label, oldValue, newValue, log;
$("#_fid_339, #_fid_328, #_fid_203, #_fid_103, #_fid_318", #_fid_27, #_fid_170, #_fid_28).on("change", function() {
log = [];
_.each([339, 328, 203, 103, 318, 27,170, 28], function(fid) {
oldValue = $("[name=_fid_oval_" + fid + "]").val();
newValue = $("#_fid_" + fid).val();
if (oldValue != newValue) {
label = $("label[for=_fid_" + fid + "]").text();
log.push(label + " was =" + oldValue + "; now =" + newValue);
}
});
$("#_fid_341").html(log.join("\n"));
});
2.) I created two variables...
The first variable is named "iol" and contains the following:
<img qbu='module' src='/i/clear2x2.gif' onload="javascript:if(typeof QBU=='undefined'){QBU={};$.getScript(gReqAppDBID+'?a=dbpage&pagename=
The second variable is named "/iol" and contains the following:
&rand='+new Date().getTime())};">
3.) In my projects table, I have created a multi line text field called [Change Log]. The field id for this field is 341. Input type is "User Input". I have the box checked for "Allow some HTML tags to be inserted in the field". I have checked "Log the edits to this field, and show them on forms".
4.) In my projects table I have created a formula text field called [-]. The field id for this field is 377. I have checked the box to allow some HTML. The formula for this field is below:
[iol] & "module.js" & [/iol]