One of the things we needed to tackle recently, was dropping content onto our 3rd party vendor sites. We’ve been doing this with JavaScript/JSON applications. To keep things simple, we needed a way to parameterize the JavaScript. We could do this with a bunch of JS variables before calling the external JS file, but that seemed…inelegant.

    var mode = "full";
    var brand = "Acme";
    var autorun = false;
<script src="somefile.js"></script>

In my PHP days, we could handle this with a simple query string in the URL: somefile.php?mode=full&brand=Acme&autorun=false

But why can’t we do this with the SRC attribute in the script tag? Well, jsParam allows just that to happen.

Continue reading