Skip to main content

Posts

Showing posts from November, 2008

Show an animated gif onClientClick

To show an animated gif, something like loading onClientClick is a simple task. You just have to add a JavaScript function on the click event so the JS function will take care until the next page loads from the server. Inside the JS function we just have to hide the excising div and show the div which contains animated loading gif. I have done it and it works fine on every other browser except IE. On IE the gif is shown but it is not animated. I have to do some R&D and what I found was IE doesn't do anything like that when it is loading another page (communicating with server) and was commented as a feature limitation of IE. But there should be a way to do that, that's what I was thinking and I found a pretty simple way to do that. Here it is and if you have a better way please share it here. <div id="divProgress" runat="server">   </div> <div id="Div1" runat="server"> The web form comes here … </div>   The J...

Disable Back & RegEx Validation: JS

Disable Back on Browser: JavaScript I know disabling back button of a browser may cause usability issue. I have identified on some occasions we have to do it (what’s if client needs it). I have found some ways to do that but I preferred using a simple JavaScript. Here is the code. < script type ="text/javascript" > < !-- window.history.forward(1); //--> < / script > This should be put on the previous page to the page you wish to disable the back. This code will redirect user to the same page if he click back button. Regular expression validation on JavaScript I know it is very much easy to validate something on JavaScript by using Regular expressions but it is hard for me to remember the syntax to do it. I’m posting this for me to get when it is needed. J Here is the Code. < script type ="text/javascript" > < !-- function validateDate(source, clientside_arguments) { ...

Tips and Tricks on Blogging

Some of my friends who maintain blogs asked me what I am doing to maintain a blog. So I thought of writing a posting will be helpful than answering all the questions individually. I will list down almost all the tips and tricks that I can remember so far. Content : - When I am reading on how to make a good blog all the guys say that you should give good content (postings). How to write good content is the problem I face. What I am doing is I writing what I feel that hard to find using Google or if I found some new way or if I simply do something then I will write about that. And the main concern is to write more than 200 words on a posting otherwise Google will ignore it. More on boost blog traffic . Customizing the theme : - A blog theme should be customized. It is like a theory. Otherwise it will look like a same ordinary blog. The user who comes to read your blog should feel that you are out of (extra) ordinary. You can easily find some good themes by just searching on Google. More ...