Hamed’s Weblog “Exploring… treasure with in”
All about learning and sharing knowledge
JS BIN – A collaborative JS editing tool
Posted by on December 24, 2010
Recently while googling I stumbled a really cool tool JS Bin.
It’s an invaluable tool for showing someone how to do something simple, or getting help on a bug you might be trying to fix. I am amazed by it’s simplicity, we can write sample Javascript without having to write all the code to include the library we wanted to use and generate the HTML, etc.
Based on your preference just select the Javascript framework viz., jQuery, jQuery UI, Prototype, Script.aculo.us etc., then write your Javascript. It will automatically generate an HTML page that includes your selected library from a content distribution network (CDN) and lets you view the output in another tab.
When you’re finished writing your code, you can use the generated public link so you can send it to people and they can see the entire script in one page.
JSBin.com has saved me a lots of time trying to debug complex JavaScript and has enabled me to create examples for people in very little time.
JSBin you rock!!!
Using POST method with window.open
Posted by on December 13, 2008
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
Posted by on May 28, 2008
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