# HTML page source not updated

**URL:** <https://www.ruby-forum.com/t/html-page-source-not-updated/171242>\
**Category:** Rails\
**Created:** [June 29, 2009, 1:29pm UTC](https://www.ruby-forum.com/t/html-page-source-not-updated/171242 "2009-06-29T13:29:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![on9west](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/6f9a4e/32.png) [@on9west](https://www.ruby-forum.com/u/on9west)\
**Post date:** [June 29, 2009, 1:29pm UTC](https://www.ruby-forum.com/t/html-page-source-not-updated/171242/1 "2009-06-29T13:29:13Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![on9west](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/6f9a4e/32.png) [@on9west](https://www.ruby-forum.com/u/on9west)\
**Post date:** [June 29, 2009, 2:15pm UTC](https://www.ruby-forum.com/t/html-page-source-not-updated/171242/2 "2009-06-29T14:15:52Z")

</div>

On Jun 29, 7:29 am, Valentino L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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

---

<div class="post-metadata">

**Author:** ![on9west](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/6f9a4e/32.png) [@on9west](https://www.ruby-forum.com/u/on9west)\
**Post date:** [June 29, 2009, 4:20pm UTC](https://www.ruby-forum.com/t/html-page-source-not-updated/171242/3 "2009-06-29T16:20:50Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![on9west](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/6f9a4e/32.png) [@on9west](https://www.ruby-forum.com/u/on9west)\
**Post date:** [July 6, 2009, 7:39pm UTC](https://www.ruby-forum.com/t/html-page-source-not-updated/171242/4 "2009-07-06T19:39:45Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> > On Jun 29, 7:29 am, Valentino L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
> > 
> > > ## 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
