Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By pbolduc on
How do I include javascript on my content pages such as about us and such?
The formating options does not have a radio button for javascript. I have several js scripts on my old site and am not familiar enough with php to make the conversion.
Thanks,
pete
Comments
Just use full HTML
If you select full HTML, you should be able to add in javascript.
______________________________________________________________________________________________________
Recent Drupal websites: http://mbacasecomp.com and http://hudsonhistoricalsociety.ca
______________________________________________________________________________________________________
I have selected full html
I have selected full html with no luck.
Do you place the javascript code in script tags in the body, or do you link to script itself.
Visited your two new sites. The are excellent! How do you code the drop down menus?
Thanks for responding,
pete
Has it ever occured to you that nothing has ever occured to God!
Yes, you must enclose any
Yes, you must enclose any javascript within the script tags. I would put the main javascript code in the head of the document, or preferably in an external .js file. Then, in your page, where you want the script result to appear, put your snippet. It depends on what the code does; if it does something to the whole page, put it in the header only. If its just a simple small script, put it in the body only.
The drop-down menu was done using Nice_menus. That is a great module. All you have to do is alter a bit of CSS and you're good to go.
______________________________________________________________________________________________________
Recent Drupal websites: http://mbacasecomp.com and http://hudsonhistoricalsociety.ca
______________________________________________________________________________________________________
Thanks for your help
Thanks for your help... got it working
pete
Has it ever occured to you that nothing has ever occured to God!