HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


JavaScript Problem

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#34280 (In Topic #7726)
Avatar

Well-settled

New JavaScript File Problem

Greetings… again,

I would like to add a javascript file to my template. The javascript comes with a CSS file, too. What the JavaScript does is that it changes how my global_div looks by CSS. I can't get it to work, I tried moddifing the JAVASCRIPT.tpl, HEADER.tpl, and GLOBAL.tpl. How do I do this? :|
 

HEllo



Back to the top
 
Posted
Rating:
#34281
Avatar

Community saint

Add the script to the HEADER.tpl and 'rel' the CSS - OR - add the CSS properties to your global.css, but check whether the (new) CSS conflicts with the current properties . . .

That should work.

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#34300

Non-joined user

How should I add, an 'rel'? Do you mean link it, or put the JavaScript code in the template. I did have copied the Javascripts result for one method it does, but now I have a CSS problem. What I'm tryying to do and the script is so post to help is that to make anything I want curved without images. I've tried images, said ending.



*The good thing about all my issues and help is me 'digging' deeper in the ocPortal doc, it's quite useful. :thumbs:

Back to the top
 
Posted
Rating:
#34304
Avatar

Community saint

Harry,

I simplified mine by adding the necessary JavaScript in this fashion:

Code

<script type="text/javascript" src=" ... link to your js file ... "></script>
<link rel="stylesheet" href=" ... link to your css ... " type="text/css" media="screen" />

and I placed it just above the </head> tag . . .

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: