Forum Discussion
JanaBaker
Qrew Cadet
This is SO great! I have some follow up questions thought! I successfully loaded all the iol stuff correctly the first try, so i am super proud of that! :)
Dan, in your Pastie, you have two variables defined.
Thank you both in advance!!
Dan, in your Pastie, you have two variables defined.
- var dbid = "bnq3c9658"; (<-- I am guessing this one is just the dbid before the ? of the table the data is coming from??)
- var dbidRecords = "bnq3damiq"; (<--where does this one come from??)
- This is my first additional thing to add to the "module.js". The code you have listed: https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=658, does that go in a Formula Field in a same Table as the variables above or do you just add a few carriage returns after the "Generic User Defined Page" stuff you so kindly provided us to get started and paste it there, meaning in "module.js"? _\_(_)_/__
Thank you both in advance!!
JanaBaker
7 years agoQrew Cadet
Thanks Carlos & Dan! Actually, I got the initial part of the IOL technique down, but missing the how to code the iframe of my grid edit report and where exactly to put this code:
(function(){
var querystring=document.location.search;
var dbid = "bnq3c9658";
var dbidRecords = "bnq3damiq";
var apptoken = "dbjtzhvncf9fjgbbpfmqxfwsv2wj";
$.ajaxSetup({data: {apptoken: apptoken}});
if (/dlta=mog/i.test(querystring) && /ifv/i.test(querystring)) {
var markup ='
<div class="RightColumn NoWrap PageNavBarActions" id="pageNavBarActions">
<a id="saveAction" href="#" class="Tall Vibrant Success" onclick="GeditDoSave(gReqDBID, true);">Save</a>
<a id="applyAction" href="#" class="Tall Vibrant Primary Secondary" onclick="GeditDoSave(gReqDBID);">Apply Changes</a>
<a id="cancelAction" class="cancelBtn Tall Vibrant FS-Button" onclick="GeditDoCancel();">Cancel</a>
</div>
';
$(markup).insertBefore("#bodyTable");
}
if (/a=td/i.test(querystring)) {
$("#facetKeyword").hide();
$('<input type="text" id="facetKeyword2" maxlength="255" class="FacetKeyword UserInput" placeholder="Search these records">').insertAfter("#facetKeyword")
$("#facetKeyword2").on("keyup", function(e) {
var keyCode = e.keyCode || e.which;
if (keyCode == 13) {
$("#facetKeyword").val($("#facetKeyword2").val()).trigger("keyup");
}
});
}
})();
Here are my follow up questions.
(function(){
var querystring=document.location.search;
var dbid = "bnq3c9658";
var dbidRecords = "bnq3damiq";
var apptoken = "dbjtzhvncf9fjgbbpfmqxfwsv2wj";
$.ajaxSetup({data: {apptoken: apptoken}});
if (/dlta=mog/i.test(querystring) && /ifv/i.test(querystring)) {
var markup ='
<div class="RightColumn NoWrap PageNavBarActions" id="pageNavBarActions">
<a id="saveAction" href="#" class="Tall Vibrant Success" onclick="GeditDoSave(gReqDBID, true);">Save</a>
<a id="applyAction" href="#" class="Tall Vibrant Primary Secondary" onclick="GeditDoSave(gReqDBID);">Apply Changes</a>
<a id="cancelAction" class="cancelBtn Tall Vibrant FS-Button" onclick="GeditDoCancel();">Cancel</a>
</div>
';
$(markup).insertBefore("#bodyTable");
}
if (/a=td/i.test(querystring)) {
$("#facetKeyword").hide();
$('<input type="text" id="facetKeyword2" maxlength="255" class="FacetKeyword UserInput" placeholder="Search these records">').insertAfter("#facetKeyword")
$("#facetKeyword2").on("keyup", function(e) {
var keyCode = e.keyCode || e.which;
if (keyCode == 13) {
$("#facetKeyword").val($("#facetKeyword2").val()).trigger("keyup");
}
});
}
})();
Here are my follow up questions.
- Does the above code go into an independent module.js with a new name or actually IN the original module.js created with the instructions provided....OR does it go in a field?
- My Grid Edit report is: https://mycompany.quickbase.com/db/bnjxiqkg3?a=q&qid=8. I know i have a Rich Text Formula to put the code in, but what do i wrap this with to make the iframe work? Like i said, this is my first one, so with a little guidance, i'll be off to the races after this weee bit of hand holding. :)