Effect.BlindDown not working properly

Hey guys,
YES I did do a search =) Here is my code:

index.rhtml:

<%= form_remote_tag :url => {:controller => "amazon", :action => "search"}, :update => 'hidden_div', :loading => "Element.hide('hidden_div'); Element.show('spinner');", :complete => "Element.hide('spinner'); Effect.BlindDown('hidden_div');" %> Search for Movie: <%= text_field "post", "title", :size => "15", :style => "font-size: 18px; border: 1px solid #BBB" %> <%= submit_tag "Search", :style => "font-size: 18px; border: 1px solid #BBB" %> <%= image_tag "ajax-loader.gif"%> <%= end_form_tag %>

controller:
def search

Query Amazon

request = Request.new(DEV_TOKEN)
response = request.keyword_search params[:post][:title], ‘dvd’, LITE
@products = response.products.slice(0,5)

render :partial => “movie_item”, :collection => @products
end

partial:

When the BlindDown occurs (on FF 1.5.0.7), if it is the FIRST time
loading the data, then the blind occurs until about halfway through
displaying the images and then just jumps to the bottom. If I try the
same query for the same keyword again or anything later, the blind is
nice and smooth. Any ideas how to fix this?

Thanks!

Btw,
That hidden_div is closed AND the problem only occurs when displaying
images, text blinds down fine. Is there a way to cache the images before
display or anything?

Vishal wrote:

Is there a way to cache the images before display or anything?
Yes, but I don’t know how :slight_smile:

gucci.com (created by those responsible for scriptaculous) seems to
cache images before displaying them - if you can figure out how they’re
doing it. Whole lot of beautiful javascript magic going on there, check
out the catalog section.

If you figure it out, let us know.

DC

David C. wrote:

actually googled and found something. check out the image.complete
property.
seems like that’s part of what gucci.com is using…

DC

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs