1
johntrot
external css & js
  • 2009/2/20 15:37

  • johntrot

  • Just popping in

  • Posts: 56

  • Since: 2005/4/7 2


How do I use external css and javascripts in my html files that I place in a custom block
john b

2
zzzzsg
Re: external css & js
  • 2009/5/26 21:33

  • zzzzsg

  • Just popping in

  • Posts: 86

  • Since: 2005/12/22


good question.
i'm also trying to include javascript in a custom block.
no luck. it just does not run.

3
mboyden
Re: external css & js
  • 2009/5/27 2:12

  • mboyden

  • Moderator

  • Posts: 484

  • Since: 2005/3/9 1


Scripts should be done just like any of the others in your site, such as:
<script type="text/j-a-v-a-s-c-r-i-p-t" src="path from web root/file.js">script>

(of course, remove the hyphens, used to prevent protector from protecting). You can do the same thing for the css, although I usually would suggest putting that into your theme's CSS.

As to the javascript in a custom block, zzzzsg, that specific issue will require some debugging. Javascript WILL run in a custom block just fine, but there is a problem with that particular code.
Pessimists see difficulty in opportunity; Optimists see opportunity in difficulty. --W Churchill

XOOPS: Latest | Debug | Hosting and Web Development

4
culex
Re: external css & js
  • 2009/6/14 16:44

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


A good place to look is here if you aim to place script in your block template

Xoops Tips
Programming is like sex:
One mistake and you have to support it for the rest of your life.

Login

Who's Online

356 user(s) are online (284 user(s) are browsing Support Forums)


Members: 0


Guests: 356


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits