<div dir="auto">Hi<div dir="auto"><br></div><div dir="auto">Hope this will work.</div><div dir="auto"><a href="http://api.jquery.com/jQuery.getScript">http://api.jquery.com/jQuery.getScript</a><br></div><div dir="auto"><br></div><div dir="auto">It is bit slower,  but possible to send an Ajax to vtigerversion.php then load relevant script </div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Thanks </div></div><div class="gmail_extra"><br><div class="gmail_quote">On 6 Oct 2017 19:23, "Alan Lord" <<a href="mailto:alanslists@gmail.com">alanslists@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have a small extension on the marketplace that I would like to make compatible with vtiger 7, but I want to keep it compatible with vtiger 6 too.<br>
<br>
As the module was released it has a single Javascript file which is loaded via a HEADERSCRIPT link.<br>
<br>
In v7 some libraries are not immediately available (hoverIntent in my example) so I have re-written part of the code to use the available qTip2 library instead.<br>
<br>
<br>
So my question is how can I either:<br>
<br>
1. Load a different javascript file via the HEADERSCRIPT depending on vtiger version<br>
<br>
or<br>
<br>
2. Determine during my javascript initialisation the version of vtiger and register an appropriate function/handler<br>
<br>
For #2 I couldn't find anything that looked remotely helpful in app.js or helper.js or several other library files and there doesn't appear to be a value anywhere in the dom either (apart from the "Powered By vtiger .." bit but that is unreliable to say the least).<br>
<br>
I can't use the layout/{vlayout,v7}/ route as this is an extension module and doesn't have any real "views".<br>
<br>
TIA<br>
<br>
Al<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div></div>