Animated gif and page refresh problem

Animated gif and page refresh problem
Hi There,
I'm trying to build a simple "Please wait......" screen using jsp and javascript.
So far all is going well except that my animatate gif keeps refreshing everything the page is refresh.
Is there a way the i can prevent the body of the page from refreshing?
below is my sample code:
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<jsp:useBean id="StatusBean" class="com1.CandidateRelease" scope="session"/>
<html>
<script LANGUAGE="JavaScript">
function refresh()
<% if (StatusBean.isRunning()) { %>     
     //setTimeout("refresh()", 1000);
     setTimeout("location='status.jsf'", 1000);
<% }else{%>
     window.location= "busStopAdmin.jsf";
<%} %>
</script>
<head>
     <script LANGUAGE="JavaScript">     
          refresh();
     </script>     
</head>
<body>
     <img id="myImage" src="../img/ojp_wait.gif" alt="" width="151" height="36">
</body>
</html>

Animated gif and page refresh problem
Hi There,
I'm trying to build a simple "Please wait......" screen using jsp and javascript.
So far all is going well except that my animatate gif keeps refreshing everything the page is refresh.
Is there a way the i can prevent the body of the page from refreshing?
below is my sample code:
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<jsp:useBean id="StatusBean" class="com1.CandidateRelease" scope="session"/>
<html>
<script LANGUAGE="JavaScript">
function refresh()
<% if (StatusBean.isRunning()) { %>     
     //setTimeout("refresh()", 1000);
     setTimeout("location='status.jsf'", 1000);
<% }else{%>
     window.location= "busStopAdmin.jsf";
<%} %>
</script>
<head>
     <script LANGUAGE="JavaScript">     
          refresh();
     </script>     
</head>
<body>
     <img id="myImage" src="../img/ojp_wait.gif" alt="" width="151" height="36">
</body>
</html>

Similar Messages

  • Animated gif and gradient color problem

    Hi there,
    I have been trying to create animated gif with gradient background. My animation works alright but the problem is that when I preview either in browser or in the preview mode, the gradient doesnt look smooth. I want to know if there is a way to work around this? I have seen some on other websites and it looks perfect. I'm wondering how they do it.
    I'll appreciate anybody's help.

    Cobby Fred wrote:
    I have to thank you all for your assistance so far. I must say I only know how to put some few things together and I do not understand some of the technical words you used such as dither, geometric dithering, blending mode... But in all I understand that if I blend colors that are close I'll get something close to smooth.
    Here's Wikipedia's page on dither: http://en.wikipedia.org/wiki/Dither Scroll down till you see the images of the cats on the right-hand side. It's a little over half-way. In the original, the cat's pretty much a gradient. If that image is saved as a .gif, see how you get wide areas of color? It almost looks like a paint-by-number picture. This similar to what happens to your radial gradient when you save as .gif. I used the word "geometric," because the radial gradient will produce arcs of grey colors. The third image of the cat has dithering. This means that, instead of setting the colors in the original image to the closest one in the restricted palette, the software tries to figure out how to speckle the image to produce an average that would look better at a distance. Turning on dithering when you go to output your gradient will help make your image smoother, just as the third cat image is smoother than the second. Here's where you turn on dithering if you go through File > Image Preview:
    Here I have my unflattened .png file
    No, it's flattened. It's a single bitmap.
    Here's a noisy image I created. It has a radial gradient at the bottom then a texture layer that has it's visibility off, because I copied it to make a greyscale version to use. I've set that to have 25% opacity and a blending mode of Multiply. Both the opacity and blending mode controls are at the top of the layers panel. This is a FW .png (Edit, no, it isn't! The forum  has stopped supporting that! ):
    If I export the gradient alone, without the texture layer, I can get this (settings are "64-color" greyscale palette and no dithering):
    or this (turning on dithering):
    While the dithered image is better, it still shows the arcs. If I set the texture layer back visible, and export with dithering on, I get this:
    The noise in the texture breaks up the geometric arcs, which makes the image look smoother. Any small texture will do that. Choosing the 64-color greyscale palette gives me either 22 or 26 colors.The 32-color palette gave me 12. You should experiment with the .gif palette settings to see what you like best. Remember that the more colors you assign to your background the fewer colors you have available for your foreground objects.
    As a final point, the red text looks blurry. When I zoom in on it (400%), some of the lines are partially "broken," specifically the verticals on the L, T, and N. You might want to try a different font or adjusting the size so that the aliasing (mapping) to the pixels is cleaner. Italic text in small sizes is difficult to use.

  • Program for turning animated .gif and MP3 files to .mov

    I need a program that takes an animated GIF and an MP3 of WAV file and turns them into a .mov file, but I don't have the money for FinalCut. Is there a cheaper (or free) program that can do this thing?

    hello. try mpeg streamclip here -
    http://www.apple.com/downloads/macosx/video/mpegstreamclip.html
    not sure if it'll help, but most users here swear by it for various format conversions. and it's free.

  • Better use for Fireworks CS6, other than animated gifs and batch process?

    I started using fireworks in the much earlier days of web design back in 2000. Now with Illustrator and Photoshop being the law of the land, fireworks has begun to fade and take a back seat.  Primarily right now i use fireworks just for creating animated gifs and batch process if i have a bunch of images that i would like to re-export or format to my liking.  Does anyone have any other better uses for this program?  detPhx
    I am just looking to utilize this more, since i install it.

    For the web, exported PNG compression is better in FW than PS.
    CS6 FW can now generate code  for CSS3 borders, gradients, Sprites, etc...
    FW can be used for jQuery Mobile Theme skinning
    http://tv.adobe.com/show/learn-fireworks-cs6/
    I still use AI for vector graphics & PS for photo & image manipulation, but FW has some nice features for web designers.
    Nancy O.

  • How do I open with an animated gif and then go to home page?

    I apologize for the newbie question, but I would like to have
    an animated gif intro to a web page. Is it possible to have the gif
    play and then go to the index file? Or do I need to insert the gif
    into an index file and save the home page as something different?
    If so, how do I get it to go to the home page automatically?
    Any help is appreciated.

    >I apologize for the newbie question, but I would like to
    have an animated
    >gif
    > intro to a web page.
    This is called a 'splash page'. To do it, you'll make your
    default home page
    (index.html/default.html/whatever) this splash page, then
    you'll have then
    sent to whatever other page you want it to go to...either via
    a HREF or a
    META REFRESH tag.
    You can't actually time the refresh to coincide with the gif
    finishing it's
    animation, though. For that, you'd have to use Flash
    animation.
    But keep in mind that this technique is pretty much frowned
    upon these days.
    It's an unecessary barrier betwen your users and your content
    and is seen by
    many as a rather dated/amateur technique.
    -Darrel

  • An animated gif which dasnt refreshed..

    Hi all !
    First let me apologize for my bad english.
    Secondly, I tried to show on the screen transpaernt animated gif, in another words, sprite(character) which walk on the desktop, well, i succsed, but there is a problem, if the sprite move is head, the on the screen you will see the sprite before and after the movmenet, there is a trail.
    i hope that you could help me.
    my code is very simple at this moment:
    public class WS extends JWindow
         Image img=null;
         Image img2=null;
         Toolkit tk=null;
         public WS()
              tk=Toolkit.getDefaultToolkit();
              this.setSize(500, 500);
              this.setLocation(500, 500);
              img2=tk.getImage("MijalNo.gif");
              this.prepareImage(img2, null);
              this.setVisible(true);
         public void paint(Graphics g)
              g.drawImage(img2, 0, 0, this);     
    }thank you.

    For those who doenst understand my problem, the here is the printscreen:
    http://members.lycos.co.uk/ofir3dvb2/theprob.JPG
    Edited by: ofir3dvb on Mar 16, 2008 5:08 AM

  • Oracle Apex partial page refresh problem in IE

    Hi All,
    I'm using a button to refresh a region by enabling ppr .
    On click of the button , m redirecting to url and the url target is as follows
    javascript:jQuery('#VH_SCROLL_EMP88').trigger('apexrefresh');
    Its working fine in firefox and chrome but not in internet explorer. When I click the button in IE I just get the following
    [object Object] in the page
    When I click back button of browser I'm getting the original page
    Please help me to understand and rectify this
    Regards
    Sasidharan

    a) What version of IE are you using, this probably factors greatly in this question
    b) If you want to partially page refresh a region, it looks like you're using a sledgehammer when all you need is your clicking finger
    - can you create a dynamic action for your button that applies a 'refresh' action to your selected region

  • GetURL Javascript Animated Gif and IE

    Do you know why when calling a JavaScript function
    from inside the Flash using the getURL(),
    the animated gifs stop looping ?
    for example:
    on (rollOver) {
    getURL("javascript: alert('after this the gifs will stop
    animate...');");
    }

    so no one else is having this problem?

  • Maintaining session across multiple browser windows and page refreshes

    Hi there,
    We're currently developing a Flex application with a couple of session-related requirements that we're not sure how to solve. Before we jump in and maybe go about things in the wrong way, I thought I'd post and see if anyone here knows of some elegant solutions!
    Currently, when our Flex app starts the user is presented with a log-in screen which authenticates the user against our server. Client-server communication is done through BlazeDS.
    Our first requirement is the ability to open a new browser window from Actionscript - this window will load a pdf document. The servlet that serves this pdf should deny the request if the user is not already logged in. The only way we can see to do this so far is to open the pdf url using navigateToUrl() with the '_blank' target, passing a jsessionid token as a url parameter. Is there a better way to preserve session state when opening a new window?
    The second requirement is to preserve some application and session across browser refreshes. Our Flex app has several screens that the user can tab between. If the user hits F5 or the refresh button in their browser, we'd like the app to return to the same screen after the refresh. I've been looking into using BrowserManager to add a fragment such as #screen=2 to the url, but of course we only want the app to display screen 2 if the user has already authenticated with the server. Is there a way to reuse the user's existing session credentials after a page refresh?
    Many thanks in advance for any advice anyone can offer on this. It could very well be that we're missing something about how BlazeDS uses / exposes session credentials that would make all of this easier to implement than we currently realise!

    We use javascript to pass values between a 'data look up' window and the originating Servlet. If this is of any use, I can send you some examples.

  • Linkbar and page refresh

    Hi,
    I have a linkbar in my application and I am using viewstack
    as my data provider. If I am in page X and navigate to page Y and
    want to go back page X the page X wont refresh. Can someone suggest
    me how to work on this.
    Thanks
    Josh

    X won;t refresh,
    you mean wont reset its values?
    thats because most likely you are setting them after page is
    created
    viewStack does not recreate its children every time
    viestack's view index is changed, it creates them once,(first time
    ) you need to hook into viewstack;s change event and do refresh
    there for particular page

  • Flash animation/click and mini slide problem

    Hi,
    we have made a roll over effect with flash and put inot
    Captivate as a single object. This works fine. When using a roll
    over box on this object, the flash animation still works. When we
    made a copy of the flash animation object and want to use another
    Captivate effect, such as the mini slide on the other animation
    object, then the flash animation does not work anymore for both
    objects.
    Any idea?
    Marcus

    Hi Marcus
    Yes, you may have two different objects on a slide. I saw
    something interesting the other day in one of my Captivate classes.
    The attendee had inserted two different slidelets. They both
    worked. She had inserted the second slidelet rollover area in a
    spot the first slidelet covered. She coaxed the user to mouse over
    the rollover trigger for the second slidelet from inside the first
    slidelet. It worked.
    You may also have multiple Rollover Captions and Rollover
    Images on a slide. Image Buttons are another type of "Rollover"
    effect in that different images are swapped in and out as needed
    when mousing over or clicking the buttons.
    So the bottom line here is to say that indeed multiple
    rollover effects do work in Captivate.
    Cheers... Rick

  • WebDypro Page refresh problem

    Hi Friends,
    I have a Layout viewset WebDynpro iView .
    When this iView is integrated and tested in Portal environment, one problem is faced.
    User clicks on Role> Workset>WebDynpro Page
    user tests the functionality and again clicks on Page link in order to see the pintail page screen, then this screen is not refreshed, the screen with previously entered values is displayed.
    How to refresh the WebDynpro iView Page screen on click of Page?

    Hai
    I have faced lot of problems for refreshing the page .
    but i solved it,use the following Code
    public static void wdDoModifyView(IPrivateTestView wdThis, IPrivateTestView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        when you enter in this area
        declare firstTime=true;
        if(firstTime) {
         "if you use the Container first you destroy all     children like below syntax"
    container.destroyAllChildren();        
    view.resetView();"
    Regards
    Dhinakar

  • Pages and page setup problems

    I love my mac and love pages but sometimes I wanna chuck it out the window.
    Here is why - I have been working on my thesis and was inserting some table in the pages doc. No problem. Except that the tables are in horizontal layout/orientation while the doc is in vertical layout/orientation so the table doesnt fit in. Now on a PC I would to to page setup and change the page layout/orientation for that page only except it seems it doesnt work here. I change the layout/orientation for all pages or no pages. Same thing is if I want to have an envelope and a letter in the same document. Same thing in Word for mac. Which is kind of a problem as it means I have to create a template on my PC and then move it to my mac to work.
    Am I missing something silly? Is there a trick I can do?

    Sparky1979 wrote:
    Which is kind of a problem as it means I have to create a template on my PC and then move it to my mac to work.
    Sparky,
    Creating a template in Word in an attempt to work around a program design choice in Pages would be a very bad option, with little chance of success.
    A landscape page is a portrait page with the content rotated 90 degrees. I think that the only things in your Pages job that can't be rotated are the Header and Footer fields, and those probably are best left alone in this case anyway. So, here's the trick. Insert a table, make sure that it is Floating, not Inline, and then rotate it 90 degrees and adjust it's position on the page. You can edit the table either before or after you rotate it.
    Similarly, envelopes could be included in the document by rotating text fields, but it's not clear to me what purpose it would serve since it would complicate printing.
    Jerry

  • Tab page refresh problem

    Hi,
    Forms Builder: 6.0.8.22
    Runtime version: 10gAS Rel 2 (Form developed in 6i and compiled and run on 10g)
    We have a form with multiple tabs based on single blocks.
    When i click on any tab other than first tab (i will call it as base tab), after sometime, control retuns to the base tab if there is no activity on that tab.
    There is no trigger or timer or delay used in this form.
    I am wondering how and why this is happening.
    Has anyone encountered this problem before ?
    Thanks
    AT

    And where is the focus after you have clicked on the new tab? In the page represented by the tab or the base tab?
    Additionally, are the pages real tabbed canvases or, as is common these days, stacked canvasses made to look like tabbed canvasses?
    (The reason for this is that a set of tabbed canvasses are loaded at startup as a set, potentially making loading take a long time while stacked canvasses are loaded as needed making the initial load time less while making navigating to the new stacked canvas take longer.)

  • Logout button and Page submission problem

    {color:#000080}Hi All,
    We have logout buttons on every page of our application. The problem is that if the user clicks on any part of the page, even on the group-panel, the logout button gets the focus and a hit on the enter key causes the user to log-out.
    I want that the logout button, should not get any focus unless and until it is clicked by the user to logout.
    Any help will be highly appreciated.
    Thanks,
    Sheen
    {color}

    Here is what I do.
    Create a page fragment that contains the logout link/button.
    I use this in a menu panel page fragment or a header panel page fragment.
    That way, you can just add the page fragment and don't have to duplicate code on every page.
    The only thing you have to do is make sure the navigation is set up properly.
    For example. I create a menu page fragment with buttons that go to each page of my application.
    The menu page fragment has all the logic to return the proper navigation string.
    The page fragment is incorporated into the page.
    You have to set up the navigation rules for each page, but do not have to include the button logic since it is included with the page fragment.
    This also isolates you from the problem where a return activates the logout button.
    As an aside, you might want to trap the return keypress and direct it where you want or toss it.

Maybe you are looking for

  • Trouble Using DataProvider in External Class

    Hello, I am creating a Flash form which will include a drop-down selection menu from which a user may choose their state. I originally accomplished this by adding a ComboBox to the stage and then populated the ComboBox's DataProvider object with an X

  • Using BEx Analyzer with Excel 2007

    Do I have to do anything special to do this? I keep getting errors whenever I try to run Bex from Excel.

  • Trouble with aligning swfs in firefox and IE

    I have a html site that has flash elements and I am having trouble getting it to look right in both IE and Firefox. The main problem comes with an area where I have two small swfs (300x110) on one line next to each other touching then a <br> and then

  • Multiple rollover areas on a slide, only one works

    Hi all, Long time reader, first time poster. I have been looking through all the forums and can't find a solution for this issue. I have a slide with six rollover captions, arranged in two rows of three. Beneath each rollover caption is a regular cap

  • Offsite Backup

    I recently switched to macbook pro from windows laptop using XP. A year ago I set up an offsite backup process using an account with iBakcup and using their software iBackup for Windows. Since I am struggling replacing this. Backup in Tiger is limite