Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2011-08-12 23:03:01
- healcode
- New Member
- Registered: 2011-08-12
- Posts: 1
How do I insert JavaScript onto a Textpattern site?
I’ve tried inserting it via the HTML section, but it won’t allow for that. The code is as follows:
<script type=“text/javascript”>
// Healcode Schedules for Moksha Yoga Calgary West : MYCW Schedule
id = “rq877m16m”;
name = “schedules”;
document.write(unescape(“%3Cscript src=‘https://healcode.com/javascripts/hc_widget.js’ type=‘text/javascript’%3E%3C/script%3E”));
</script>
<noscript>Please enable Javascript in order to get <a href=“http://healcode.com” target=”_blank”>HealCode</a> functionality</noscript>
When placed on the backend of the site it should render a schedule, but it does not do anything as the code isn’t being read.
Offline
Re: How do I insert JavaScript onto a Textpattern site?
I’ve tried inserting it via the HTML section, but it won’t allow for that.
Edit: Oh, nevermind, can you paste your HTML at pastebin.com and share the link here?
Last edited by maruchan (2011-08-12 23:21:04)
Offline
Re: How do I insert JavaScript onto a Textpattern site?
Try adding notextile..
before your javascript code if you are placing it in an article. Like this:
notextile.. <script type="text/javascript"> // Healcode Schedules for Moksha Yoga Calgary West : MYCW Schedule id = "rq877m16m"; name = "schedules"; document.write(unescape("%3Cscript src='https://healcode.com/javascripts/hc_widget.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<noscript>Please enable Javascript in order to get <a href="http://healcode.com" target="_blank">HealCode</a> functionality</noscript>
To start a paragraph after notextile you have to use a p.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#4 2011-08-13 00:13:48
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: How do I insert JavaScript onto a Textpattern site?
Did you use a code editor? Because, your quotes are typographical quotes.
Offline
Offline
#6 2011-08-13 00:52:45
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: How do I insert JavaScript onto a Textpattern site?
Ah, yes … Thanks for the tip.
Offline