jsloader

this is a Joomla 1.5 plugin i made some time ago to help me develop Joomla components and modules

the main prupourse of this is to enable the developer to load some js script without having to check if

the javascript is already loaded or not,

all you have to do is to use some special calls in your code to tell the plugin to load the js files for your

example:
// set mainframe as global

global $mainframe;

// example to load a js file

$mainframe->triggerEvent('onJsLoad', array($this->baseurl . '/uri/to/js/jquery.js', null));

// example to add some code piece

$mainframe->triggerEvent('onJsLoad', array( null,'<script type="text/javascript" >jQuery.noConflict();</script>'));

Please leave me a comment if you use it, I am looking forward to hear what you think from this, also if you have any suggestion or improvement let me know.

http://informalthinkers.com/wp-content/plugins/downloads-manager/img/icons/setup.gif download: jsloader.tar.gz (1.37KB)
added: 23/08/2009
clicks: 1880
description: this plugin helps you load javascript parts on your joomla development

About Esteban Soler

mi nombre es Esteban Soler, vivo en Mar del Plata, una ciudad costera en Argentina. Tengo 31 años y hace mas de 7 que me dedico al desarrollo de aplicaciones y sitios web. En general intento aplicar soluciones utilizando software libre solamente.

10 comments on “jsloader

  1. donde debería escribir el código? en el index.php?
    Perdón por la ignorancia… :)

  2. este plugin está apuntado a desarrolladores mayormente, ya que el problema que resuelve es el problema que se tiene cuando se están desarrollando o integrando multiples componentes, y todos usan mas o menos las mismas libs de js
    el codigo va dentro de tu componente, modulo o template, y se usa para cargar los js
    en este momento estoy trabajando en una nueva version que permitiria distintos tipos de carga, para mejorar la performance de los sitios

  3. Hi Cristy, I don’t know what do you mean by provide background. more info about how to use this plugin?
    this plugin is aimed for developers that must integrate js into joomla websites. It is not the kind of plugin that most people would use. Anyways I am writing a new version of this plugin. aimed towards the js optimization instead. so stay tuned!

  4. I have this plugin on a site and an error is displayed when sending email via the standard Joomla contact form. Using IE

    document.body is null or not an object
    jsloader.php Line:19 Char 23004

    Any suggestions

    Dave

  5. are you getting a javascript error? or is an error message shown in html? if is javascript I assume that might be some error with the js you are loading using the script

  6. not really, maybe partially, but i made this plugin to be able to load many different script in different ways, I am writing a new version now that will allow to change many things like when , how and in which order will the scripts load.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>