DiegoOrellana
6 years agoQrew Trainee
Save and Scooby Doo triggers before saving
Hello, How can I implement save and scooby doo properly? I follow the instructions found in:
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=467&rl=pdf
and read most of the posts from: https://community.quickbase.com/quickbase/topics/what-is-the-save-and-scooby-doo-technique
And I know that the demo works: https://haversineconsulting.quickbase.com/db/bkjdxnw2x?a=td
But somehow I cannot make it work for me. When I implement the IOL I get the script triggered before pressing the save button.
How I implemented it:
step 1: Created a script (modulescooby.js) on pages:
step 2: Then I added a field in the table I want the script to be triggered witht he following content:
[iol] & "modulescooby.js" & [/iol]
With the field displaying on edit, view, and add.
What I'm doing wrong? Thank you!!
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=467&rl=pdf
and read most of the posts from: https://community.quickbase.com/quickbase/topics/what-is-the-save-and-scooby-doo-technique
And I know that the demo works: https://haversineconsulting.quickbase.com/db/bkjdxnw2x?a=td
But somehow I cannot make it work for me. When I implement the IOL I get the script triggered before pressing the save button.
How I implemented it:
step 1: Created a script (modulescooby.js) on pages:
(function(){
var querystring=document.location.search;
if (/nwr/i.test(querystring)) {
$("<iframe>", {id: "QBU_editform", name: "QBU_editform"})
.css({display: "none"})
.appendTo("body")
.on("load", function() {
QBbusyHide();
var rid = this.contentWindow.kRid;
var markup = "";
markup += "<h2>You just created a new record with [Record ID#] = " + rid + " !<h2>";
markup += "<center><img src='http://vignette3.wikia.nocookie.net/hanna-barbera/images/2/24/Scoobydoo.jpg' height='200'></center>";
$("<div>").html(markup).dialog({
title: "Save and Scooby Doo!",
modal: true,
close: function(event, ui) {
document.location.href = gReqDBID + "?a=er&rid=" + rid;
}
});
});
$("form[name=editform]").prop({target: "QBU_editform"});
}
})();
step 2: Then I added a field in the table I want the script to be triggered witht he following content:
[iol] & "modulescooby.js" & [/iol]
With the field displaying on edit, view, and add.
What I'm doing wrong? Thank you!!