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

davemybes’s picture

If you select full HTML, you should be able to add in javascript.

______________________________________________________________________________________________________
Recent Drupal websites: http://mbacasecomp.com and http://hudsonhistoricalsociety.ca

______________________________________________________________________________________________________

pbolduc’s picture

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!

davemybes’s picture

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

______________________________________________________________________________________________________

pbolduc’s picture

Thanks for your help... got it working

pete

Has it ever occured to you that nothing has ever occured to God!