Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
How to link to javascript (.js)
Helo
We are linking to css by inserting this code:
<link rel="stylesheet" href="<txp:css />" type="text/css" media="screen" />
but how to link to javascript code, and where should i put this on serwer?
Thanks
Last edited by Sencer (2006-03-21 15:37:31)
Offline
#2 2006-03-21 15:58:05
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How to link to javascript (.js)
<script type="text/javascript" src="/whatever.js"></script>
in the head.
In this case whatever.js is in your root.
Offline
Re: How to link to javascript (.js)
thanks a lot;)
Offline
Re: How to link to javascript (.js)
or you can put the javascript in a form (say with name “js”) and link to it from the page template
<code><txp:output_form form=“js” /></code>
Admittedly this is not linked js as the code will appear in the html page but, on the positive side, you keep all in the db which makes it easier to back up or migrate to a new server.
Last edited by colak (2006-03-22 12:11:45)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Pages: 1