Forum Discussion
_anomDiebolt_
10 years agoQrew Elite
I still think you should use the UNOB technique but if you are dead set on using an onclick attribute here is a nice trick to get the redirect to work in all circumstances.
It is a little know fact but all modern browser automatically create global variables for every element with an id attribute. This means that there is already a global variables for RedirectURL and you don't even have to call getElementByID("RedirectURL"). You can just set its value with this simple statement:
It is a little know fact but all modern browser automatically create global variables for every element with an id attribute. This means that there is already a global variables for RedirectURL and you don't even have to call getElementByID("RedirectURL"). You can just set its value with this simple statement:
RedirectURL.value=[insert your homepage url here];Browsers do not automatically create a global variable for all elements with a name attributes - but they do for named forms (and a few others). So you can access the hidden rl name attribute as follows and set it to an empty string:
editform.rl.value="";These are the two conditions you need to setup to gain full control of the redirection process QuicBase uses. So if you are dead set on using an onclick handler this should work under all conditions:
<div class='Vibrant Success' onclick='RedirectURL.value=[insert your homepage url here];editform.rl.value="";DoSave();'>Save</div>
- MikaelAndreasso5 years agoQrew MemberIs there any special consideration to be taken when I am attemping to save and then redirect into an API call?
I am trying to save a grid edit report that is placed inside a from and then create a new record in another form.
------------------------------
Mikael Andreasson
------------------------------- MarkShnier__You5 years ago
Qrew Legend
The easiest way is to have this syntax for the initial edit button
var text EDIT = the url to edit
var text Next = the url where you want to go to
$EDIT
& "&NextURL+" & URLEncode($Next)
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------