Loading...
 
Skip to main content

Features / Usability


Javascript

I would like to put javascript into some of my wiki pages (using 1.9.0). I'm guessing this dissapeared with the script-injection fixes.

How might I go about putting it back in? I'd like to put some javascript into a module.

Thanks,
Corey

The best way is to make a Wiki Plugin that renders the Javascript on the page. I have many of them on TikiMODS.comQuestion, then display the page contents in an IFRAME inside the module.

You can also use the TikiMODS.com/PluginJSQuestion if you have trusted page editors.

You can also include the JS (and CSS) in your header.tpl and then put any HTML into the module.

Let me know if you need more help!

-- colorado


> I would like to put javascript into some of my wiki pages (using 1.9.0). I'm guessing this dissapeared with the script-injection fixes.
>
> How might I go about putting it back in? I'd like to put some javascript into a module.
>
> Thanks,
> Corey

Thanks colorado!

I did this, and it works! However, whenever I edit a page now, it says:

Warning: Cannot modify header information - headers already sent by (output started at tikiwiki/lib/wiki-plugins/wikiplugin_myjs.php:22) in tikiwiki/tiki-editpage.php on line 782

I can post the source, but there is really nothing to it.

Thanks for your help!
Corey



> The best way is to make a Wiki Plugin that renders the Javascript on the page. I have many of them on TikiMODS.comQuestion, then display the page contents in an IFRAME inside the module.
>
> You can also use the TikiMODS.com/PluginJSQuestion if you have trusted page editors.
>
> You can also include the JS (and CSS) in your header.tpl and then put any HTML into the module.
>
> Let me know if you need more help!
>
> — colorado
>
> ---
> > I would like to put javascript into some of my wiki pages (using 1.9.0). I'm guessing this dissapeared with the script-injection fixes.
> >
> > How might I go about putting it back in? I'd like to put some javascript into a module.
> >
> > Thanks,
> > Corey

If you post the url and IM me a login and password I'll take a look at it.

Colorado

> Thanks colorado!
>
> I did this, and it works! However, whenever I edit a page now, it says:
>
> Warning: Cannot modify header information - headers already sent by (output started at tikiwiki/lib/wiki-plugins/wikiplugin_myjs.php:22) in tikiwiki/tiki-editpage.php on line 782
>
> I can post the source, but there is really nothing to it.
>
> Thanks for your help!
> Corey