Load ajax data NOT in a div or other element

first of all, sorry for my bad english, I speak spanish.
Well, I need some help in this case:

I made a microsoft excel POI report using java, this report is in a servlet that I call when do a clic in a href, por example:

<a href="ServeletReport">Report</a>

Until here, all ok, but I need to call this report using an event (it could be .load()) from jQuery, but this event only works assigning the data result to a div or other element. I not need assign the result to any element because my report is generated and open through in excel, if I assign it to a div, in this div appears rare simbols.

I need too add a loading imagen until my report is ready and opened.

I have a bad code, please I need some help.

$  ("#mylink").click(function(){
    $  ("#contenidoo").empty().html('<img src="images/loading-icon.gif"/>');
    $  ("#result").load("ServletReport");
});

I not need to put the result in a div $ (“#result”), I dont need to put the result in any place, I want to do clic and wait until my report is generated but viewing the loading image.

newest questions tagged jquery – Stack Overflow

Tags: , , ,

About Admin