Skip to main content

Animated Gif not working when used with window.location


Today I came across a peculiar problem, might be known to many but I have never got into this before since this is the first time am trying this ;). Problem is like whenever location.href or window.location is used I can’t show animated GIF image as progress bar. I googled for few mins and found various solutions like using Iframe for the progress icon alone and some gave me some hack like adding src of the image tag again after navigation code.

Code that wasn’t working:


Function(){
Showprogressbar();
Location.href = “”;
}

But something strokes my mind to change the position like we used to do with Jquery plugins (when fighting to integrate multiple plugins) ;). This gave me a simple solution like below and it worked :)

Working Code:

Function(){
Location.href = “”;
Showprogressbar();
}

Hope it helps you too. If it doesn't post your problem as comment and I will try to give you the solution at the earliest.

Comments

Popular posts from this blog

Creating multi module project with maven

Creating my first multi module project with maven I got a superb step by step article for maven project creation in eclipse while googling. This article is good for beginners like me :) , no need do too many things, just follow the steps at the end you will see “Hello World” in the browser. Check the below link for the wonderful article. http://skillshared.blogspot.in/2012/11/how-to-create-multi-module-project-with.html Thanks Semika Loku Kaluge

Unable to convert MySQL date/time value to System.DateTime - Solved

Few days back I got an exception like 'Unable to convert Mysql date/time value to system.datetime' but this happened only after deploying and locally everything was working fine. After googling for sometimes found the reason that, it was due to the formatting difference between Mysql and C# also empty date value is causing some issue. Later found the below solution to fix'em. Add an extra property(Convert Zero Datetime = true) to connectino string. e.g server=localhost;User Id=root;password=pwd;database=test; Convert Zero Datetime=true Solution obtained from StackOverflow :)

Converting String to a Executable line in JAVA

I've been searching for converting a string into a executable line so that I could process it... after searching for sometime, as usual I got a solution in the name of BeanShell scripting awesome one... This is another scripting language built with Java, which is powerful and was able to solve my need... This is the link for it : http://www.beanshell.org/manual/bshmanual.html#Download_and_Run_BeanShell Hope this helps you as well... If anyone requires any help on this, a basic one ;) ... sure post a comment, will help if I could...