Forum Discussion
ChuckGrigsby
Qrew Cadet
First I wouldn't use the $.get inside console.log. I'd be willing to give you a hand if you're willing to do this in a .js custom page instead of a formula text .and then adding an invisible field to load the JS file known as the image onload technique. It's a pretty simple setup and can be found on the forum. If you add IOL and want help feel free to reach out. Chuck@Chuck.Support
_anomDiebolt_
7 years agoQrew Elite
In this particular use case you could forgo using the IOL technique and just call $.getScript() through one of these mechanisms when the link was clicked by the user:
<a href=javascript:$.getScript(...)>Click Me</a>
<a onclick=$.getScript(...)>Click Me</a>
Using the IOL technique is essential when you want to immediately call the script in your code page rather than wait for some user interactions such as clicking on a link.
But the point in favor of always using IOL is why craft a bunch of different solutions over the lifetime of you applicatioin when you can simply set up IOL once and uniformly invoke it through the standard method whenever needed:
[iol] & "moduleTable.js" & [/iol]
Why litter your brain remembering a dozen different partial solutions?
<a href=javascript:$.getScript(...)>Click Me</a>
<a onclick=$.getScript(...)>Click Me</a>
Using the IOL technique is essential when you want to immediately call the script in your code page rather than wait for some user interactions such as clicking on a link.
But the point in favor of always using IOL is why craft a bunch of different solutions over the lifetime of you applicatioin when you can simply set up IOL once and uniformly invoke it through the standard method whenever needed:
[iol] & "moduleTable.js" & [/iol]
Why litter your brain remembering a dozen different partial solutions?