ajax, anchors and scrolling

    Date: 03/29/07 (Web Development)    Keywords: browser

    I'm working on an ajax feature that collapses a large amount of content (blind up fom scriptaculous).

    The problem I'm having is that the user left looking at the footer because the browser doesn't follow the collapsed content. The quick solution was to jump to an anchor after the collapse occurs. This works, but it's very disorienting to have the page instantly jump to a spot. I'd like to have the browser follow the content as it collapses. I hope this is a clear explanation. Anyone have any ideas?

    Here is a diagram. The ajax call will collapse comments 1 through 4. During the collapse I want the browser to follow comment 5 as it moves up.

    div:comments
    li:comment_1
    li:comment_2
    li:comment_3
    li:comment_4 <-- collapse
    li:comment_5
    li:comment_6
    /div

    form
    ..
    ..
    footer

    Source: http://community.livejournal.com/webdev/398565.html

« Flash Question || advertising »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home