Friday, August 29, 2014

adding script to specific page by using Location="ScriptLink" in solution

Hi,


Please try to use ScriptBlock attribute to add custom javascript:



<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://ift.tt/TQ1shZ;
<CustomAction
Location="ScriptLink"
ScriptBlock="
document.write('&lt;script type=&quot;text/javascript&quot; src=&quot;~site/SiteCollectionDocuments/PDPScheduleExtension.js&quot;&gt;&lt;/' + 'script&gt;');"
Sequence="100" />
</Elements>

More information:


http://ift.tt/1mWxVTp


Thanks,

Dennis Guo

TechNet Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.




Dennis Guo

TechNet Community Support



No comments:

Post a Comment