1. You can set your editor to *not* filter out the javascript.
2. It is very easy to create a simple module and put your code in it. (I have
a tutorial for it but it's not updated for 2.5. The main difference is that
you now need to register modules in the database in the #__extensions table.)
There are probably up-to-date tutorials on YouTube for doing this. Once you
see how easy it is, you won't both spending time looking for extensions that
fit, you'll just make your own!
________________________________
From: David Roth <davidalanr...@gmail.com>
To: NYPHP SIG: Joomla <joomla@lists.nyphp.org>
Sent: Tuesday, July 31, 2012 6:54 AM
Subject: [joomla] Converting a HTML/JavaScript page to be a module in Joomla
I have a JavaScript program which does some simple calculations. It emulates
what you would do in a spreadsheet. It isn't fancy, but it is functional and I
want to make a Joomla module out of it. I didn't write a CSS for this because
it was intended to be used in Joomla from the start and I want it to inherit
the Joomla CSS that's resident.
My first thought was, create a custom HTML module, go into HTML editing mode
and paste the HTML page with it's JavaScript in there.
The result is, it didn't work. It kept the HTML formatting of the page, but it
filtered out all the JavaScript. There are no external files referencing the
JavaScript and jQuery is not being used. Maybe it needs to be an actual
mod_david_calc and that will do it? But I must be missing something else in
order to do that. Can't imagine getting away from free in Joomla without having
to call some Joomla function to make it work. :-)
So then I spent time searching and it appears some sort of special treatment is
needed for your own JavaScript to be available in Joomla.
Why I'm posting about this, is that I would like to get some direction as to
what is the best way to do this. Is there a favorite Joomla extension people
use to help make all this happen? Also, should it be a module or can/should it
be a Joomla Article for this JavaScript calc program? It only needs to appear
on one page. Thanks!
David Roth
_______________________________________________
New York PHP SIG: Joomla! Mailing List
http://lists.nyphp.org/mailman/listinfo/joomla
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php
_______________________________________________
New York PHP SIG: Joomla! Mailing List
http://lists.nyphp.org/mailman/listinfo/joomla
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php