I'm tasked with building a new ActiveX control to replace an old one -- but I don't have the code for the old one so I have to reverse engineer this a bit -- and that's not a huge deal. But, I was given this code snippet of JavaScript which is calling an entry point of this ActiveX control.
However, I don't quite understand it fully, so that's where I'm hoping you all can help.
<
and >
, are they encoded when sent to the ActiveX object?%printContent
performing? Is that just one of their JavaScript functions?o.setDirectory("<%printContent(util.Utility.getFormattedLocation(), false)%>")
The code in the snippet is actually a call to a Java module and is executed by the Java virtual machine. This is much like the old ASP engine, and the newer ASP.NET and MVC engines, however it actually works inside of JavaScript!
This JavaScript is executed as Java and the return value is statically put in its place when the JavaScript is sent to the client.