Ray
Ray

Reputation: 6095

grails - how to view resulting page source javascript, when it is updated via Ajax via rendering of a template, for example

If one uses remoteFunction or one of the the Grails Ajax capabilities, rendering a template to update a portion of a page, how does one see any additions made to the Javascript functions associated with the resulting page in Chrome or Firefox?

In Chrome, one is able to see the updated page/DOM via going to their Tools -> Developer Tools menu item, then selecting "Elements". There, I'm able to use the magnifying glass to select a portion of the updated page that I want to see. But, how do I also see the additional Javascript functions added to the page.

NOTE: Originally this question requested to see both html element content and Javascript content. Karthick AK's answer handles both.

Upvotes: 0

Views: 152

Answers (1)

Karthick AK
Karthick AK

Reputation: 208

In Chrome->Developer tool-> Network tab, For each request being sent the response obtained can be seen in the Response tab. The rendered content can be seen in here.

Similiar option exists for firefox/firebug. Another ajax gotcha i have experienced is, sometimes the ajax requests are cached and hence onclick the content is served from the cache and not an actual requests hits the server. This is more prominant in Old IE browsers

Upvotes: 2

Related Questions