This topic is locked

Using javascript libraries and plugins

10/11/2009 10:47:53 PM
PHPRunner General questions
E
electromotive author

I gather that phprunner is using jQuery javascript library? That's really cool. Can I add plugins for this library, and if so where is the best place to add the necessary <script src="..." statements?
Is there any good examples around of javascript coding practice within the phprunner framework?
Is there any risk longterm that the usage of jQuery and plugins might become unstuck and break as phprunner gets upgraded?
I have guessed that in order to add the module(s) to the build, you add the new ##.js modules to "C:\Program Files\ PHPRunner5*\ source\ include\ common" folder, and edit "..\source\files.txt" and add lines for "include\common\jquery.##.js include\jquery.##.js". But I'm still trying to work out where to put the <script .. src=..> statements, and then the best way to add the javascript code to the "editor" pages and/or event handlers.
One way I've already tried is to add separate php pages/forms in a separate folder (but part of the same session/package) and then add events in PHPR to setup the session variables, change location, and independently process a page/form with necessary javascript/php and sql query/update the database. But I'd prefer to integrate the addon javascript into the project more tightly if possible and be able to manipulate dom elements. I am in the midst of development and rebuild the project several times a day, so need a way which doesn't require modifying the generated code after every build. And of course integrating the new code into PHPR would allow retention of a all its benefits including a consistent theme, headers, etc.

J
Jane 10/12/2009

Hi,
you can add custom JavaScript code to your pages in HTML mode on the Visual Editor tab.