Latest News
Feb. 10th 2008
Released: JSMX v2.6.4 (Code Enhancements)
Feb. 6th 2007
Released: JSMX v2.6.3 (UTF-8 support)
Mar. 25th 2006
Donate
Help advance the JSMX technology by making a donation.
Extending JSMX
The version of JSMX available for download has been deliberately left VERY basic and covered under the Creative Commons License. This was done in an effort to let the API remain very straight forward but still give developers the flexiblity of customizing it to fit their individual needs. To this end I will typically not be versioning up the API (except in cases where the changes are transparent and backward compatible). Instead, I have decided to add this page in an attempt to offer possible ways of extending JSMX if you choose to.
The "Loading Box"
As of JSMX Version 2.3.0, I have added one possible solution for creating a "loading box" to inform your site's visitors that something is happening while your JavaScript is communicating with the server. Below is a description of how it works.
Inside the engine.js file I am already creating a DIV for you (with the ID of 'JSMX_loading') each time a server request is made, then destroying that DIV when the response is recieved. Using CSS inside your display files you can posistion the DIV and apply a background image of a "loading.gif". The effect is a Pop-Up "Flag" that appears while your server side functionality is processing.
To take advantage of this functionality you need to follow three steps:
- Open your copy of engine.js and make sure you have version 2.3.0 or later. If you have an earlier version or if you have not yet downloaded engine.js, click here.
- Click on this image
and save it to somewhere under your webroot - Add the following (or a similar) delaration to a <style> block or .css file within your display page:
div#JSMX_loading{ position:absolute; top:20px; right:150px; margin:0px; padding:0px; width:112px; height:30px; background-image:url([path to this image]/processing.gif); background-repeat: no-repeat; background-position:center center; z-index:200; }
And that's it! Don't forget to change the "background-image" path to a valid url. Of course, you can also substitute the GIF I have listed here with your own image. If you choose not to take advantage of the built-in process I've provided and "roll-your-own" method for creating a "loading div" instead, I would love to hear from you on the solution you came up with.
If you have any topics you would like to see addressed here or if you have come up with a solution to a problem and you'd like to share it, please feel free to contact me via the feedback form on this site. I would love to include your suggestions/solutions on this page.
