Forum Discussion
_anomDiebolt_
10 years agoQrew Elite
First of all I don't recommend invoking JavaSscript from a formula in this fashion. Not that you can't get it to work but rather because the image onload technique is the most flexible way to inject JavaScript into a QuickBase authored page that works in just about all scenarios. Why have a grab bag of different ways to inject JavaScript when one way covers all use cases?
But I do recognize that some people are more comfortable with formulas and that these questions will keep being asked. So against my better judgement let me answer as follows:
1) First all your JavaSript variables such as TaskName, RelatedLead, etc should be prefixed (or namespaced) with QBU_ (ie QBU_TaskName, QBU_RelatedLead) so that they will not conflict with QuickBase variables that may have the same name.
2) In your z_Main_Javascript_Processor.js user defined page you need to place all of you code within a closure:
(function(){
//your code here
})();
If you don't do this the variables you create within the user defined page may also conflict with QuickBase variables that may have the same name.
My advice if you want to stick with your current approach is to fix these two issues, repeat your testing and post a new question focusing on the exact problem you have at that point.
But I do recognize that some people are more comfortable with formulas and that these questions will keep being asked. So against my better judgement let me answer as follows:
1) First all your JavaSript variables such as TaskName, RelatedLead, etc should be prefixed (or namespaced) with QBU_ (ie QBU_TaskName, QBU_RelatedLead) so that they will not conflict with QuickBase variables that may have the same name.
2) In your z_Main_Javascript_Processor.js user defined page you need to place all of you code within a closure:
(function(){
//your code here
})();
If you don't do this the variables you create within the user defined page may also conflict with QuickBase variables that may have the same name.
My advice if you want to stick with your current approach is to fix these two issues, repeat your testing and post a new question focusing on the exact problem you have at that point.