How to View Source HTML of Modal Dialog Window

Its a known functionality of the windows opened using ShowModalDialog function of javascript that you can not view html source of a modal dialog window but its a problem during the development because you might need to view html source of the window for debugging.
Here is the simple solution of the problem...

Add following javascript code in your web page.

< script language="javascript" >
function showHTML()
< /script >

And add following html code anywhere in the body of the web page.

< input type=button value="View Source" onclick="showHTML()" >

Now when you will browse your modal window and click on the said button, the HTML source code of the modal window will open in another window.


Anonymous said...

pervyy nax!

Anonymous said...

I found this site using [url=][/url] And i want to thank you for your work. You have done really very good site. Great work, great site! Thank you!

Sorry for offtopic

mikedanese said...

Thanks Sanjay,
I looked all over to see how to do it(show/view source of modal window).
Thanks for posting. MD.

Allan said...

we provide our valued clients a comprehensive portfolio of new age IT consulting services that streamline their process, help them manage change, innovate newer opportunities for maximizing profit and best of all assist build a credible brand.