Copy the following into the <HEAD> section
<script type="text/javascript">
<!--
function viewSource() {
window.location = "view-source:"+window.location;
}
//-->
</script>
Copy the following where you want the button to go.
<form>
<input type="button" value="View Source" onClick="JavaScript:viewSource()">
</form>
You can use the following without the script:
<INPUT type=button value="View Source 2" onclick="window.location =' view-source:' + window.location;">
<A HREF="#null" onclick="window.location =' view-source:' + window.location; return false">View Source 3</A>
To view the source of a frame from another frame
<A HREF="#null" onclick="window.location =' view-source:' + parent.framename.location; return false">View Source</A>
framename is the name of the frame that contains the source to be viewed.