*********************************************************************** What is minimax? It's a minimal Ajax library. You can read files in the same domain but it cannot read from other domains or in a page in a computer reading from a file in the same computer, it has to run in a Webserver. *********************************************************************** How to use minimax? First you need to declare minimax.js, and it has to be in the same server where the page is. Second, you have to declare the instance of minimax var minimax = new minimax('url', 'div'); where URL is the URL where we are going to get the contents, and 'div' is the id for the div where we are going to put the results. You can set 'div' as false so it wouldn't put the text in the page, but even then you can get the result. Second, sometimes we can get data asyncronously, sometimes not. If you have to get those data syncronosuly we should create a semaphore. Create a hidden input and declare the semaphore for each instance that would use it. The input container has to be declared befor we create the semaphore in the minimax instance. Third, if you want a trobbler (something to be show while geting data) you can declare it like two states from the same div. You need to know CSS, sorry. mx.setTrobbler('trobbler_div', 'class_on', 'class_off'); where 'trobbler' is the id of the div, 'class_on' and 'class_off' are the classes to switch when start the to read data (on) and stop reading data (off).
Reading...
Loading...
And to get data you can use post('post') or get().
Loading...
The contest of
would change, using the result from the url. If you want to get the data in a variable, insted of write it in the div, you can use the variable xhr of the instance. And if you want to change the div (or span) where the text would go, you can use setDiv() Old-text *********************************************************************** Contact Ideas? Comments? email me: sebaxtian at gawab dot com www.sebaxtian.com