Browse by Tags

All Tags » Javascript (RSS)

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