How to view generated source

A collection of tutorials and posts that show additional functionality of MATE

Moderator: KarelB

How to view generated source

Postby KarelB » Tue May 17, 2011 6:21 am

Although this is more a general computing subject rather then a mate subject I think it is useful to have this subject.

Because it is sometimes useful to see the source code of the mate table on the screen for debugging purposes.
But since the table is drawn on the screen by javascript calls it will not show up in the browsers standard "View Source" command. Therefore you have to look at the "generated source". Unfortunately not all browsers are capable of showing the generated source but here are some tips to see it:

FireFox

In Firefox there are two ways.
1 Install the Web Developer add-on. Besides the possibility of viewing the generated source you get a wealth of nice webtools for debugging/examining webpages
2 Once the table is drawn on the screen type Ctrl-a and left mouse button has the option "View Selection Source"

Internet Explorer
Type the following script in the address bar and save as a bookmark "View Generated Source:
Code: Select all
javascript:'<xmp>'+opener.window.document.documentElement.outerHTML+'<xmp>

Go to the page for which you want to see the source and load the bookmark.

Chrome
I do not know of a way in Chrome the get to the generated source inside the browser. Although the webdeveloper add-on is standard in the latest Chrome, the option for Generated Source is not.
One way might be to save the webpage to a file and open it in your editor to see the code.
KarelB
 
Posts: 433
Joined: Mon Dec 01, 2008 11:49 pm
Location: The Netherlands

Return to How To

Who is online

Users browsing this forum: No registered users and 1 guest

cron