PDA

View Full Version : posting source code from a Modal window


allida77
10-17-2002, 03:24 PM
On a modal window you can not right click and view source. Is there some script that will print out the source code on the page. It does not have to be pretty I am just trying to debug and can not see the html I am writing out.

Thanks.

Roy Sinclair
10-17-2002, 05:29 PM
This will get you the body content at least:

<a href="javascript: alert(document.body.innerHTML);">Show Source</a>

glenngv
10-18-2002, 06:16 AM
to display source as if you click View Source:

<a href="javascript:location.href='view-source:'+location.href;">Show Source</a>

beetle
10-18-2002, 06:43 AM
http://www.codingforums.com/showthread.php?s=&threadid=4500&highlight=bookmarklet