Share & let Share

Home

Log

Programming and Relationships

The recent controversy about the missing semicolons in the Twitter's Bootstrap library had me thinking, we the developers, who do we code for? Do we code for our clients, our users? If you said yes to any of those you are right, but not completely.

Think about all the ...

jQuery removeAttr for onclick and IE9

Did you know that the removeAttr method cannot remove the 'onclick' attribute on IE9 browser? Seems strange right, unfortunately it's true. jQuery is not at fault here though, IE9 has a bug it seems. So for now use the .prop('onclick', null) method to get the job done.

For ...

Client Element visibility based on Server Element

Ever wanted to hide a client-side element based on the visibility of the server-side element in ASP.NET? The below achieves this by using the Visible property and some CSS.

Suppose you have the following:


<div id="clientElement">Blah Blah...</div>
<div id="serverElement" runat="server">Some more Blah...</div ...

Override onclick

Sometimes it is required to override the onclick values pre-populated by server to implement our own handlers and also call the overriden functions. The code below does this very reliably without any browser specific hacks.

Working on a recent recent project required me to perform some operations on a click ...