1
Katmando
add info to the <body> tag
  • 2004/2/24 15:20

  • Katmando

  • Just popping in

  • Posts: 10

  • Since: 2003/1/4 1


Hello,

I have some javascript in one of my pages that is in a module that I am developing and I need an onload added to my body tag. It should look like this <body onload="opt.init(document.forms[0])">

What is this best way to to do this?

Thak you

2
Herko
Re: add info to the <body> tag
  • 2004/2/24 15:53

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


Add it to your theme.html file That's where the body tag is.

Herko

3
Katmando
Re: add info to the <body> tag
  • 2004/2/24 15:59

  • Katmando

  • Just popping in

  • Posts: 10

  • Since: 2003/1/4 1


Thanks for the reply herko.

I only need to have this with some of my pages and by modifing the theme.html would cause it to load with everything. Not the resault I would think I would want.

Am I incorect in my thinking? or could there be a better way.

Thanks again

4
Herko
Re: add info to the <body> tag
  • 2004/2/24 16:14

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


you could add the script as a smarty tag to the modules you want to use it in, and call it in the theme.html tag only if the module has that tag, like <body <{if $modscript !=""}><{$modscript}><{/if}>>

You'll have to look in your modules to see how ou can assign things to smartytags tho. That's the only way I know of to make it module specific.

Herko

Login

Who's Online

233 user(s) are online (158 user(s) are browsing Support Forums)


Members: 0


Guests: 233


more...

Donat-O-Meter

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

Latest GitHub Commits