Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
jr5 adding script to the header
adanhash



Joined: 08 Apr 2007
Posts: 224

Posted: 09/05/13 03:22 
Hi, is there a way when a function/module is on the page we can call and add a javascript in the header for that function or module.

I see that foxycart javascript link has been added to the header

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 09/07/13 08:57 
Yes you can - in your module view function, add something like:


Code

    $_tmp = array('source' => "{$_conf['jrCore_base_url']}/modules/yourModule/js/custom.js");
    jrCore_create_page_element('javascript_href', $_tmp);


Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Developers

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.