HTML page source not updated

Dear all

After I search something, it can successfully display the result in the
browser. However, I view the Page source and found that the HTML code
between the ‘event_list’ div tag is not updated , the content is same as
before searching…It is so strange. This problem happen in both IE and
firefox…

Any idea?

Thank you very much.

Valentino

Source code for reference.
View
<% form_remote_tag :html => {:action => “index”, :id => ‘event_form’},
:update => ‘event_list’, :before =>
“$(‘spinner’).show();$(‘event_list’).hide()”, :success =>
“$(‘spinner’).hide();$(‘event_list’).show()” do %>

<%= submit_tag “Search” %>

<% end %>

<%= render :partial => 'event_list' %>

Controller
def index

    .........

    if request.xml_http_request?
        respond_to do |format|
            format.html {render :partial => "event_list"}
        end
    end
end

On Jun 29, 7:29 am, Valentino L. [email protected]
wrote:

Dear all

After I search something, it can successfully display the result in the
browser. However, I view the Page source and found that the HTML code
between the ‘event_list’ div tag is not updated , the content is same as
before searching…It is so strange. This problem happen in both IE and
firefox…

I think browsers are just lazy about updating the page source. If the
changes you’ve made actually display then i wouldn’t worry about it

Fred

If you install the firebug extension for firefox there is an option to
view the “generated source”.

Cheers,
Nicholas

On Jun 29, 8:14 am, Frederick C. [email protected]

Some browsers reload the page when viewing the source code. So you
wont see any changes done by ajax callbacks.

2009/6/29, Nicholas H. [email protected]:

On Jun 29, 7:29 am, Valentino L. [email protected]

Source code for reference.
<% end %>
if request.xml_http_request?
respond_to do |format|
format.html {render :partial => “event_list”}
end
end
end

Posted viahttp://www.ruby-forum.com/.


Von meinen Mobilgerät aus gesendet