Browse by Tags

All Tags » ASP.NET » Javascript (RSS)

Server Controls vs Plugins by joelvarty

I think the ASP.NET world has changed completely as far as reusable code is concerned.  Let’s start with a bit of background…   Server Controls I remember when making reusable code in ASP.NET meant writing custom server controls that had all...
Filed under: , , ,

Getting comfortable with Javascript callbacks by joelvarty

It seems every language has it’s own way of implementing callbacks. Back in the VB days (daze?) we used the addressof operator and all kinds of win32 stuff to get app and activex control to do what we wanted. In C#, we have the delegate (and the anonymous...
Filed under: , , ,

JavaScript Compilation: Is this what will turn the web into the new desktop? by joelvarty

The Web is the New Desktop Can we finally expect to see web browser truly competing with native apps?  IE 9 does JavaScript in the background on the first load of a page, running in non-compiled mode until the scripts are ready, and then they run...

jQuery Masonry – the answer to vertical flow layout by joelvarty

“Masonry is a layout plugin for jQuery. Think of it as the flip side of CSS floats. Whereas floating arranges elements horizontally then vertically, Masonry arranges elements vertically then horizontally according to a grid. The result minimizes vertical...
Filed under: , ,

ResolveUrl in Javascript by joelvarty

This is something that is super easy, yet I get asked about it quite often. Here’s how you do it: In the master page for the site, put this: < script type ="text/javascript" > var baseUrl = "<%= ResolveUrl(" ~/ ") %>"...
Filed under: ,

Using the Generic Dictionary with JSON web services… by joelvarty

If you want to pass a name/value collection of untyped data to a webservice with JSON, do it like this guys, Joost van Schaik, says: http://dotnetbyexample.blogspot.com/2008/03/json-services-revisited-using.html   Here’s the meat of it really – how...
Filed under: , , ,

JQuery - get a handle on a server element in javascript without using <%= elem.ClientID %> by joelvarty

One of the things I see  a lot of is code that looks like this: < asp:CheckBox ID ="chkEnable" Text ="My Checkbox" runat ="server" /> < script type ="text/javascript" > var chkEnable = $get( "<...
Filed under: , ,

javascript:void() will throw a javascript error - you need to use javascript:void(0) by joelvarty

  This is one of those javascript errors that makes me shake my head a bit, but with more and more Ajax style apps being built in Asp.Net, I have started seeing this quite a bit. If you have something like this: <a href="javascript:void(...
Filed under: , ,
More Posts