We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Loading javascript in custom module CP

Development and Programming

evasion's avatar
evasion
58 posts
18 years ago
evasion's avatar evasion

Hello,

I’m currently working on some e-commerce module with more features than the simple commerce module.

I was wondering if it’s possible to add some javascript stuff in the header. I read the documentation, and the DSP Class function’s list, but there’s nothing about the header, only the body of the page.

In fact, I would like to use some Ajax features (sorting, …) in the control panel interface of the module, and I don’t know how to load my file :

</script>

Could somebody help please ?

Thanks in advance !

Best regards,

Jeremie

       
evasion's avatar
evasion
58 posts
18 years ago
evasion's avatar evasion

In case someone need the answer, while browsing the Publish Class I found the solution :

<?php
// add something into <head></head>
$DSP->extra_header .= 'yeah';
?>

Best regards,

Jérémie

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
18 years ago
Leevi Graham's avatar Leevi Graham

Thanks or adding this to the forum. Ill incorporate it into the next release of my module.

Previously I was adding the code to the bottom of the content. Not very good practice.

Cheers

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.