On Wed, 10 Nov 2010 20:39:31 +0000 Scott Dolan <sdo...@v12groupinc.com> wrote: > Thanks MK, > But, I am looking for a pure mason and ajax and/or jquery > solution. I am currently have a solution similar to pastebin work > using CGI and ajax.
I think you do not understand, sorry if I was not clear. Suggestion #2 is pure mason with ajax (which would be the best way to do it). Nb, jQuery is just a javascript library that (in part) implements "ajax" methods (you can also write them yourself, but most people will recommend against this because of hassles with maintenance, different browsers, etc). "Ajax" itself is just conceptual: http://en.wikipedia.org/wiki/Ajax_(programming) It exploits the *client side* potential of javascript, which (short of flash, et. al.) is necessary for communicating with the server and modifying page content without replacing the entire page. Anyway, lemme try and explain that second suggestion again: 1) You write a mason script that accepts two parameters, a filepath and a total size. This page checks the current size of the file on the server, and turns that into a percentage of the total size. This is used to create the html mark-up for the progress bar, which is what that .mhtml file creates (so it's not a complete html page, it's just a partial "component"). 2) Your file upload page fires a javascript rountine on submit that uses setInterval (a standard javascript function) to poll the server, via some AJAX method, every 1000 milliseconds. The ajax call is to the mason page from #1. It receives fresh html from the mason component which you use to update (replace) the progress bar, so that it reflects the size of the file on the server. So, that's just a mason page and some javascript (probably making use of a library such as jQuery). Make sense? MK -- "The angel of history[...]is turned toward the past." (Walter Benjamin) ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users