Using umbraco 6, I would like to create a user control which would create some JavaScript so it's placed on the masterpage header section.
How could I achieve this? So far I have a string builder which holds my custom JavaScript but what's the best way to get it to be placed within the header section of the masterpage I choose without affecting the current code that's already in the header section?
How to run JavaScript on masterpage
Using umbraco 6, I would like to create a user control which would create some JavaScript so it's placed on the masterpage header section.
How could I achieve this? So far I have a string builder which holds my custom JavaScript but what's the best way to get it to be placed within the header section of the masterpage I choose without affecting the current code that's already in the header section?
Hi Bob
If you want do not touch header code it's better to put js at the bottom of the "head" tag.
For rendering js you can use macro or just usual usercontrol.
Thanks,
Alex
Hi Bob
Very interesting how did you solve the issue, can you share, please?
/Alex
is working on a reply...