javascript [Resolved]

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
cwifi

javascript [Resolved]

Post by cwifi »

Ok.. I wonder if anyone can shed some light on this.

I have the following code i need to use


document.write('');
document.write('email enquiry');


I understood that if i want to include this directly in the content i should wrap it in {literal} {/literal} - which i did.. but it just displayed the javascript code as content..

I then did the same with global content and user generated tags.. it did the same..

Finally I made it call the code from a .js file i created and all it did was display the code telling it to read the .js file.

Any idea's ?
Last edited by cwifi on Sat Jun 09, 2007 4:27 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: javascript

Post by calguy1000 »

the only time you need to include {literal} scripts is when there are { and/or } characters in your javascript
the rest of the time, the javascript should fit into your page template or page content without any of these.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
cwifi

Re: javascript

Post by cwifi »

I see, I removed them but still the code gets dumped straight onto the page as if it was content.. any idea's ?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: javascript

Post by calguy1000 »

It's Probably a broken tag further above.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
cwifi

Re: javascript

Post by cwifi »

In the content ?

There's only a few words and one UDT
Post Reply

Return to “Developers Discussion”