SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Progress indicator problems

    Hello,

    I have a script that is using javascript to hide and show large numbers of table cells depending on selected options. The process seems to be cpu intensive and takes up to 10 seconds to complete so I am trying to indicate that something is actually happening to the user but I'm having several problems.

    Lets say i do this..
    Code:
    onclick="progressimageon(); processshowhide; progressimagesoff();"
    What I wanted is progressimageon to place my animated gif on the screen, then processshowhide executes taking 10 seconds, then progressimageoff to hide the progress image. But what actually happens is it doesn't update anything until all the processing has finished so you never see the anim gif. The individual functions work ok when run alone.

    If I can get that working I have the problem that animated gifs seem to halt while cpu heavy javascript is running. Is there any way around that?

    One other problem, this script takes around 10 seconds in ie7 but completes in around 1 second in firefox. Is there any reason ie is so slow? Basically the bulk of the scripts load is several loops that use document.getElementById(\"0readmoreblock\" + cc).style.display=isin; to display/hide a large number of table cells.

    Any insights would be greatly apreciated.

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does anyone have any ideas on this they could share? Is this method just not a goer?

    I also tested the script in Safari and that is as fast as firefox so it appears it is just IE that is really slow.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •