Welcome Guest | Login

Ajax notifier on home page.

Sometimes when people connect to my site there is a delay of up to 30-50 seconds. i would like to have a javascipt or something progress bar on the home page to tell people they are connecting and need to wait.

If I do this in my rails application they will not see the progress bar until they are connected. What is the best way to move forward?

Thank you

Russell

2008-03-21 06:36 AM

Hi Russell - one way to do this would be to have an indicator gif image/description at the top of your page that disappears when the page is fully loaded. You can use an onLoad in the body tag to do something like $('indicator').style.display = 'none' which will be triggered after everything is fully loaded.

2008-03-21 01:20 PM

Thank you William

I don think that would work.

Yes in my application I use a javascript loading image
when I am searchinmg the database


in the view

<div  id="searching" style="display:none;"><%= image_tag("progerssbar_editnplace.gif") %></div>

<%= observe_form('session_search', :url =>{ :action => 'psession_count'} ,
              :loading =>"Element.show('searching')",
              :complete =>"Element.hide('searching')") %>

But I think for this type of thing to work I need to connect with my application.

The server performance has been wonderful recently but occasionally there is a bottle neck like 8 hours ago.

I believe this is due to a server thing as my home page is just a form.

With rails the index page giff will only show when the application is active.

2008-03-21 03:45 PM

If the initial page is taking a long time then the method I mentioned should work - but, yes, for your search you just need the standard progress indicator.  

2008-03-21 05:57 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.