impresspages 4.0.16. bug in ipAddJs function?

46 Views Asked by At

I'd need some help on (IP 4.0.16). I'm trying to pass parameters to a js file by the function ipAddJs

ipAddJs('file.js', array('id' => 123))

but in the generated html the result is

<script type="text/javascript" src="[path]/file.js?1" id="123"></script>

am i doing something wrong or is it a bug?

1

There are 1 best solutions below

0
On

Second parameter in ipAddJs function is for HTML attributes. Therefore, the result is as expected.

If you want to add variable to a filename, just put it as you want them:

ipAddJs('file.js?id=123');