YUI file upload with jsp backend

For last two weeks I was working on some user interface logic and happened to use Yahoo UI library (YUI). The task was to upload an image using Ajax. Since I was new to YUI, I was looking here and there over the net for some references. There were some good ones but thats for PHP back-ends, but mine was a jsp back-end and i didn’t know how to read the object thrown out from the YUI side.

with some more digging I came across nice file handling library in Apache commons (Commons File Upload) and took use of it to do the task. the code is as follows.

YUI File UploadS

function init(){
  var onUploadButtonClick = function(e){
    //the second argument of setForm is crucial,
    //which tells Connection Manager this is a file upload form
    YAHOO.util.Connect.setForm('testForm', true);

    var uploadHandler = {
      upload: function(o) {
  YAHOO.util.Connect.asyncRequest('POST', 'upload.php', uploadHandler);
  YAHOO.util.Event.on('uploadButton', 'click', onUploadButtonClick);

YAHOO.util.Event.on(window, 'load', init);

I took the above code segment directly from a YUI file upload tutorial hence the credit goes to the author. The jsp back-end using apache commons file upload is as follows.
Continue reading YUI file upload with jsp backend


Placing DHTML layers over the FLASH content

Adobe (Macromedia) Flash is one of the technologies we use to add fancy eye catching animations to our web sites. But after the resent development of Ajax, developers tend to blend CSS and JavaScript effects with those flash animations making their sites look more new or rather web 2.0 (ish).

For some time i was searching for a method to place DHTML layers over the Flash objects, yet i couldn’t find an article regarding this matter or rather i didn’t spend much time sweeping the NET regarding this. How ever For a web site I was doing recently I had to use the lightbox.js effect But again I met the problem of laying the DHTML layer over my flash content, Luckily in the troubleshooting part in the lightbox web page i found the path directing to the Adobe official site where this problem is wildly discussed.

As it says “Use the WMODE parameter to allow layering of Flash content with DHTML layers. The WMODE parameter can be ‘window’ (default), ‘opaque’, or ‘transparent’. Using a WMODE value of ‘opaque’ or ‘transparent’ will prevent a Flash movie from playing in the topmost layer and allow you to adjust the layering of the movie within other layers of the HTML document.”

You can gather more details at http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_15523


Is it AJAX or FLASH ?

Today I was integrating some eye catching AJAX effects to one of the web sites I was developing, and one of my friend Told me “Nice Flash Effect”….. I smiled for a moment and thought it really is…

AJAX is Growing So fast that I feel sooner it will beet Macromedia FLASH animation what you include in your website. There are many AJAX frame works available to take use of and play with some great Javascript effects. What I was Using today for this perticular site is Adobe Spry framework , simply designed with great animations. This framework is so much trying to catch the flash like effects. It’s a wonderful situation that Current owners of Macromedia is doing such a thing and making the 1st move…