Hi All!
window.open() javascript method is quite useful for opening the page using HTTP GET method, but in some situation we want to do the same by calling POST method.

Recently I encountered a scenario where I have to open a page in a new window with the POST method. The actual problem was Ajax could not handle content-disposition properly, in my case I need to provide Export to Excel feature from the main Ajaxified window. I used jQuery to write cross-browser compatible javascript as under

$(‘#btnExport’).click(function(){
if (SQL.length>0)
{
var url=’../Httphandlers/ExcelExportHandler.ashx’;
var form = $(document.createElement(“form”))
.attr( { “method”: “post”, “action”: url })
.html(“”+SQL+”");
$(“body”).append(form);
form[0].submit();
}
});

Bye the way what is jQuery?

jQuery is a small but power-packed bundle of javascript functions that make writing javascript quick and simple. Selecting elements on your page is like using CSS, learning and using functions requires minimal fuss, and the learning curve is sometimes described as “zero”.

Subsonic is a really cool tool for writing “ZERO CODE DAL”, It was fathered by Rob Conery, which is based on the idea of Active Record Pattern.

More on subsonic click:
http://www.subsonicproject.com