encountered a very old project they are using `&lt...
# cfml-general
s
encountered a very old project they are using
<cfset AjaxOnLoad('OpenReport')>
and the OpenReport is using fancybox
Copy code
openReport = function() {
    $(".openReport").fancybox({
        'height': '90%',
        'width': '50%',
        'type': 'iframe',
        'scrolling': 'auto',
        'autoscale': true,
        'transitionIn': 'elastic',
        'transitionOut': 'elastic'
    });
}
i am given the task to change it tofancybox 5, and ajaxonLoad, eventually i forgot about the ajaxonload things, used it in 2011 and now ist 12 years any suggestions anyone how can i proceed ahead with this
r
Remove the AjaxOnLoad and implement the equivalent in JavaScript.
Copy code
document.addEventListener('DOMContentLoaded', () => {
    openReport();
});
You may have to adjust the syntax some depending on the browsers you have to support, but that will work with anything modern.