I Hope This clears up a lot of peoples questions, but here is the complete code, minus build.htm that is loaded manually by the user. that is at the bottom.
<?xml version="1.0" ?><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"<html xmlns=" xml:lang="en">
<head id="Header">
<TITLE>Phantom HTML 4.01 Build version 1.01a</TITLE>
<meta name=vs_targetSchema content="HTML 4.0">
<script type="text/javascript">
//This is the build area displayer called with only you or from the RPSPC build.htm
function BuildArea(){
document.all.htmlArea.style.display =('block')
}
</script>
<meta name="vs_defaultClientScript" content="JavaScript">
<META NAME="save" CONTENT="snapshot">
<STYLE>
.saveSnapshot {behavior:url(#default#savesnapshot);}
.inviso {width:0px;height:0px;border:0px}
.show {dispay:block}
.hide {display:none}
</STYLE> <!--Core Functionality-->
</head>
<BODY id="Bel" class="saveSnapshot" bgcolor="#000000" text="#ff0000"
onload="handleResponse();"><p align="center">
<br>You must write perfect html if you plan for the<br> build button to work for you. for
building ideas and howto's visit <br>Microsofts developers network web work shop section<br><a
href=" TO
MSDN</a><br>For More References Goto My links page to find some excellent reading material...<a
href="refs.htm">Go to my links page</a>
</p>
<p align="center">This is the beginning interface for PhantomXHTML Live
v1.0b<br>this web page is almost entirely content editable<br>if you know how to access the
proper elements and functions.</p>
<!--Invisible Div until Something is inserted into it(html&Text) for the Top of
the Body-->
<div id="TopHtm"></div>
<br>
<script>
TopHtm.style.display =('none');
</script>
The Best you toolagain<input id="GB" type="button" value="Go"
onclick="navigate()">
<input type="text" value='http:\\ id="TheAddress" size="25">
<span id="WebWin" style="DISPLAY:none">
<iframe src="" id="TheFrame" style="WIDTH:550px;HEIGHT:550px" frameborder="0"></iframe><button
type="button" onclick="RBT()">Remove onsite website</button>
<script language="vbscript">
'navigate the internet 1 line + 1 style set
function navigate()
document.all.TheFrame.src = TheAddress.value
document.all.WebWin.style.display =("block"
end function
function RBT()
document.all.TheFrame.src =("about:blank"
document.all.WebWin.style.display =("none"
end function
</script>
</span>
<!--Persistable User data variables-->
<script>
var FPersist="";
var SPersist="";
var BPersist="";
//Save all User Input Data
function SaveBel(){
window.STop.click;
window.SBottom.click;
}
//function for Loading both the bottom and the top divs into memory for Building
function LoadBel(){
BPersist = FPersist + SPersist;
BPersist = BPersist + Bel.innerHTML;
}
</script>
<div id="htmlArea" style="display:none">
<table id="TABLE1" style="WIDTH: 451px; HEIGHT: 25px"><tr><td align="left">Build Top HTML
here:</td><td align="right">
Build Bottom HTML here:</td></tr></table>
<!--Make all output data formatted as html-->
<!--Make an text areas that can be edited from the webpage live for the Top of the Body-->
<table><tr><td><textarea id="TopBody" cols="25" rows="10"
class="saveSnapshot"></textarea><br>Click to Build<br>your HTML on Top:<br><!--Button for
Building the Top of the Body--><input type="button" onclick="BTBody()" value="Build"
ID="Button1"><br>Click to save Top:<br><input TYPE="button" VALUE="Save"
onclick="FPersist=TopBody.innerText;" ID="STop"><br>Click to load Top:<br><INPUT TYPE="button"
VALUE="Load Top" onclick="TopBody.innerText=FPersist;" ID="LTop"></td><td><textarea id="EndBody"
cols="25" rows="10" class="saveSnapshot"></textarea><br>Click to Build<br>your HTML on
Bottom:<br><input type="button" onclick="BBBody()" value="Build" ID="Button2"><br>Click to save
Bottom:<br><input type="button" value="Save" onclick="SPersist=EndBody.innerText;"
id="SBottom"><br>Click to load Bottom:<br><input type="button" value="Load Bottom"
onclick="EndBody.innerText=SPersist;" id="LBottom"><br></td></tr></table><p align="left"><input
type="button" onclick="LoadBel()+BTBody()+BBBody()" onmouseover="SaveBel()" value="Build all"
ID="Button3"><br><input type="button" onclick="CRTOS()"value="Build Objects and
Scripts"></td><th></th><td><br><textarea id="CSO" cols="25" rows="10" class="saveSnapshot">This
Text area is strictly for building objects and scripts.</textarea></p></div>
<script>
//TopHtm Div Clear of html & text
function CTBody(){
TopHtm.innerHTML="";
TopHtm.innerText="";
}
//Top body Builder
function BTBody(){
var top = TopBody.innerText;
TopHtm.insertAdjacentHTML("afterBegin", top);
TopHtm.style.display = ('block');
}
//Bottom Body(BotHtm) Builder
function BBBody(){
var bottom = EndBody.innerText;
BotHtm.insertAdjacentHTML("beforeEnd", bottom);
BotHtm.style.display =('block');
}
//BotHtm Div clear of html & text
function CBBody(){
BotHtm.innerHTML="";
BotHtm.innerText="";
}
function handleResponse() {
var theFormDiv = document.getElementById('theFormDiv');
theFormDiv.style.display = 'none';
var responseMessage = document.getElementById('responseMessage');
var message = '<p align="center">To build the form that emails<br>click here'
message += '<button id="BF" onclick="showForm(); return false;">build
form<\/button><\/p>'
document.all.responseMessage.innerHTML = message;
document.all.responseMessage.style.display = 'block';
}
function showForm() {
var theFormDiv = document.getElementById('theFormDiv');
theFormDiv.style.display = 'block';
document.forms['emailForm'].reset();
var responseMessage = document.getElementById('responseMessage');
responseMessage.style.display = 'none';
}
function processState(st) {
alert(st)
}
function processState(st) {
alert(st)
}
function buildQueryString(emailForm) {
theForm = document.forms[emailForm];
var qs = ''
for (e=0;e<emailForm.elements.length;e++) {
if (emailForm.elements[e].name!='') {
qs+=(qs=='')?'?':'&'
qs+=emailForm.elements[e].name+'='+escape(emailForm.elements[e].value)
}
}
return qs
}
</script>
<!--End Core Functionality-->
<!--The vbscript function list. Learn these to help build and add content
functionality.-->
<script id="FnctnLst1" language="vbscript">
function Closeit()
window.close
end function
</script>
<!--End Script Core-->
<!--Form For Emails and responsemessage.-->
<div id="theFormDiv" class=saveSnapshot>
<FORM id="emailForm" enctype="multipart/form-data">
<p><B>Recipient's e-mail address:</B><br>
<INPUT TYPE=text id="address" value=""><br>
<B>from:</B><br>
<input type="text" id="from" value=""><br>
<B>Send To Multiple people CC:</B><br>
<input type="text" id="CC" value=""><br>
<B>Subject:</B><br>
<INPUT TYPE="text" id="subject" value=""><br>
<B>Message:</B><br>
<TEXTAREA ROWS="10" COLS="20" WRAP="PHYSICAL" id="message"></TEXTAREA></p>
</FORM>
<FORM NAME=mailMessage ACTION="" METHOD="post" ENCTYPE="text/plain" onSubmit="return
callToServer(this.name);">
<P ALIGN="left">
<button type="submit" onclick="CRMail()">send</button><input type="button"
onclick="handleResponse()" value="Remove Form">
<script>
var IFrameObj; // our IFrame object
function callToServer() {
if (!document.createElement) {return true};
var IFrameDoc;
var URL = 'content.htm' + buildQueryString(emailForm);
if (!IFrameObj && document.createElement) {
// create the IFrame and assign a reference to the
// object to our global variable IFrameObj.
// this will only happen the first time
// callToServer() is called
try {
var tempIFrame=document.createElement('iframe');
tempIFrame.setAttribute('id','RSFrame');
tempIFrame.style.border='0px';
tempIFrame.style.width='0px';
tempIFrame.style.height='0px';
IFrameObj = document.body.appendChild(tempIFrame);
if (document.frames) {
// this is for IE5 Mac, because it will only
// allow access to the document object
// of the IFrame if we access it through
// the document.frames array
IFrameObj = document.frames['RSFrame'];
}
}
catch(exception) {
// This is for IE5 PC, which does not allow dynamic creation
// and manipulation of an iframe object. Instead, we'll fake
// it up by creating our own objects.
iframeHTML='\<iframe id="RSFrame" style="';
iframeHTML+='border:0px;';
iframeHTML+='width:0px;';
iframeHTML+='height:0px;';
iframeHTML+='"><\/iframe>;';
document.body.innerHTML+=iframeHTML;
IFrameObj = new Object();
IFrameObj.document = new Object();
IFrameObj.document.location = new Object();
IFrameObj.document.location.iframe = document.getElementById('RSFrame');
IFrameObj.document.location.replace = function(location) {
this.iframe.src = location;
}
}
}
if (navigator.userAgent.indexOf('Gecko') !=-1 && !IFrameObj.contentDocument) {
//give NS6 a fraction of a second
//to recognize the new IFrame
setTimeout('callToServer()',10);
return false;
}
if (IFrameObj.contentDocument) {
// For NS6
IFrameDoc = IFrameObj.contentDocument;
} else if (IFrameObj.contentWindow) {
// For IE5.5 and IE6
IFrameDoc = IFrameObj.contentWindow.document;
} else if (IFrameObj.document) {
// For IE5
IFrameDoc = IFrameObj.document;
} else {
return true;
}
IFrameDoc.location.replace(URL);
return false;
}
</script>
</FORM></P>
</div>
<!--end Form and response core-->
<div id="BotHtm" class=saveSnapshot></div>
<script>
BotHtm.style.display =('none');
</script>
<span class="hide">
<iframe id="EFrame" style="width:0;height:0px;border:0px" src="CEM.htm"></iframe></span>
<script language="vbscript">
function CRMail()
Execute("EFrame.Rmail()"
end function
</script>
<!--Customize with your with site dynamic scripts. script core-->
<p class=saveSnapshot>This is for dynamic loading of special html files into my page to include
or remove certain functionality. try build.htm, showemail.htm, and clearemail.htm</p>
<input type="text" id="ST" >
<input type="button" onclick="loadScript(url);" onfocus="url=ST.value" value="Get the page">
<iframe src="about:blank" id="RSFrame" style="DISPLAY:none"></iframe>
<script>
function CRTOS(){
var OS = document.createElement(CSO.innerHTML)
Bel.appendChild(OS)
}
var url="";
//your custom server modules for this page
function loadScript(){
document.all.RSFrame.src = url;
}
</script>
<div id="responseMessage"></div>
</BODY>
</html>
This is build.htm load it your self must be in same directory or sub folder <if sub folder> then name of sub folder\build.htm it worked for me...
<body><script>window.parent.BuildArea();</script></body>
<?xml version="1.0" ?><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"<html xmlns=" xml:lang="en">
<head id="Header">
<TITLE>Phantom HTML 4.01 Build version 1.01a</TITLE>
<meta name=vs_targetSchema content="HTML 4.0">
<script type="text/javascript">
//This is the build area displayer called with only you or from the RPSPC build.htm
function BuildArea(){
document.all.htmlArea.style.display =('block')
}
</script>
<meta name="vs_defaultClientScript" content="JavaScript">
<META NAME="save" CONTENT="snapshot">
<STYLE>
.saveSnapshot {behavior:url(#default#savesnapshot);}
.inviso {width:0px;height:0px;border:0px}
.show {dispay:block}
.hide {display:none}
</STYLE> <!--Core Functionality-->
</head>
<BODY id="Bel" class="saveSnapshot" bgcolor="#000000" text="#ff0000"
onload="handleResponse();"><p align="center">
<br>You must write perfect html if you plan for the<br> build button to work for you. for
building ideas and howto's visit <br>Microsofts developers network web work shop section<br><a
href=" TO
MSDN</a><br>For More References Goto My links page to find some excellent reading material...<a
href="refs.htm">Go to my links page</a>
</p>
<p align="center">This is the beginning interface for PhantomXHTML Live
v1.0b<br>this web page is almost entirely content editable<br>if you know how to access the
proper elements and functions.</p>
<!--Invisible Div until Something is inserted into it(html&Text) for the Top of
the Body-->
<div id="TopHtm"></div>
<br>
<script>
TopHtm.style.display =('none');
</script>
The Best you toolagain<input id="GB" type="button" value="Go"
onclick="navigate()">
<input type="text" value='http:\\ id="TheAddress" size="25">
<span id="WebWin" style="DISPLAY:none">
<iframe src="" id="TheFrame" style="WIDTH:550px;HEIGHT:550px" frameborder="0"></iframe><button
type="button" onclick="RBT()">Remove onsite website</button>
<script language="vbscript">
'navigate the internet 1 line + 1 style set
function navigate()
document.all.TheFrame.src = TheAddress.value
document.all.WebWin.style.display =("block"
end function
function RBT()
document.all.TheFrame.src =("about:blank"
document.all.WebWin.style.display =("none"
end function
</script>
</span>
<!--Persistable User data variables-->
<script>
var FPersist="";
var SPersist="";
var BPersist="";
//Save all User Input Data
function SaveBel(){
window.STop.click;
window.SBottom.click;
}
//function for Loading both the bottom and the top divs into memory for Building
function LoadBel(){
BPersist = FPersist + SPersist;
BPersist = BPersist + Bel.innerHTML;
}
</script>
<div id="htmlArea" style="display:none">
<table id="TABLE1" style="WIDTH: 451px; HEIGHT: 25px"><tr><td align="left">Build Top HTML
here:</td><td align="right">
Build Bottom HTML here:</td></tr></table>
<!--Make all output data formatted as html-->
<!--Make an text areas that can be edited from the webpage live for the Top of the Body-->
<table><tr><td><textarea id="TopBody" cols="25" rows="10"
class="saveSnapshot"></textarea><br>Click to Build<br>your HTML on Top:<br><!--Button for
Building the Top of the Body--><input type="button" onclick="BTBody()" value="Build"
ID="Button1"><br>Click to save Top:<br><input TYPE="button" VALUE="Save"
onclick="FPersist=TopBody.innerText;" ID="STop"><br>Click to load Top:<br><INPUT TYPE="button"
VALUE="Load Top" onclick="TopBody.innerText=FPersist;" ID="LTop"></td><td><textarea id="EndBody"
cols="25" rows="10" class="saveSnapshot"></textarea><br>Click to Build<br>your HTML on
Bottom:<br><input type="button" onclick="BBBody()" value="Build" ID="Button2"><br>Click to save
Bottom:<br><input type="button" value="Save" onclick="SPersist=EndBody.innerText;"
id="SBottom"><br>Click to load Bottom:<br><input type="button" value="Load Bottom"
onclick="EndBody.innerText=SPersist;" id="LBottom"><br></td></tr></table><p align="left"><input
type="button" onclick="LoadBel()+BTBody()+BBBody()" onmouseover="SaveBel()" value="Build all"
ID="Button3"><br><input type="button" onclick="CRTOS()"value="Build Objects and
Scripts"></td><th></th><td><br><textarea id="CSO" cols="25" rows="10" class="saveSnapshot">This
Text area is strictly for building objects and scripts.</textarea></p></div>
<script>
//TopHtm Div Clear of html & text
function CTBody(){
TopHtm.innerHTML="";
TopHtm.innerText="";
}
//Top body Builder
function BTBody(){
var top = TopBody.innerText;
TopHtm.insertAdjacentHTML("afterBegin", top);
TopHtm.style.display = ('block');
}
//Bottom Body(BotHtm) Builder
function BBBody(){
var bottom = EndBody.innerText;
BotHtm.insertAdjacentHTML("beforeEnd", bottom);
BotHtm.style.display =('block');
}
//BotHtm Div clear of html & text
function CBBody(){
BotHtm.innerHTML="";
BotHtm.innerText="";
}
function handleResponse() {
var theFormDiv = document.getElementById('theFormDiv');
theFormDiv.style.display = 'none';
var responseMessage = document.getElementById('responseMessage');
var message = '<p align="center">To build the form that emails<br>click here'
message += '<button id="BF" onclick="showForm(); return false;">build
form<\/button><\/p>'
document.all.responseMessage.innerHTML = message;
document.all.responseMessage.style.display = 'block';
}
function showForm() {
var theFormDiv = document.getElementById('theFormDiv');
theFormDiv.style.display = 'block';
document.forms['emailForm'].reset();
var responseMessage = document.getElementById('responseMessage');
responseMessage.style.display = 'none';
}
function processState(st) {
alert(st)
}
function processState(st) {
alert(st)
}
function buildQueryString(emailForm) {
theForm = document.forms[emailForm];
var qs = ''
for (e=0;e<emailForm.elements.length;e++) {
if (emailForm.elements[e].name!='') {
qs+=(qs=='')?'?':'&'
qs+=emailForm.elements[e].name+'='+escape(emailForm.elements[e].value)
}
}
return qs
}
</script>
<!--End Core Functionality-->
<!--The vbscript function list. Learn these to help build and add content
functionality.-->
<script id="FnctnLst1" language="vbscript">
function Closeit()
window.close
end function
</script>
<!--End Script Core-->
<!--Form For Emails and responsemessage.-->
<div id="theFormDiv" class=saveSnapshot>
<FORM id="emailForm" enctype="multipart/form-data">
<p><B>Recipient's e-mail address:</B><br>
<INPUT TYPE=text id="address" value=""><br>
<B>from:</B><br>
<input type="text" id="from" value=""><br>
<B>Send To Multiple people CC:</B><br>
<input type="text" id="CC" value=""><br>
<B>Subject:</B><br>
<INPUT TYPE="text" id="subject" value=""><br>
<B>Message:</B><br>
<TEXTAREA ROWS="10" COLS="20" WRAP="PHYSICAL" id="message"></TEXTAREA></p>
</FORM>
<FORM NAME=mailMessage ACTION="" METHOD="post" ENCTYPE="text/plain" onSubmit="return
callToServer(this.name);">
<P ALIGN="left">
<button type="submit" onclick="CRMail()">send</button><input type="button"
onclick="handleResponse()" value="Remove Form">
<script>
var IFrameObj; // our IFrame object
function callToServer() {
if (!document.createElement) {return true};
var IFrameDoc;
var URL = 'content.htm' + buildQueryString(emailForm);
if (!IFrameObj && document.createElement) {
// create the IFrame and assign a reference to the
// object to our global variable IFrameObj.
// this will only happen the first time
// callToServer() is called
try {
var tempIFrame=document.createElement('iframe');
tempIFrame.setAttribute('id','RSFrame');
tempIFrame.style.border='0px';
tempIFrame.style.width='0px';
tempIFrame.style.height='0px';
IFrameObj = document.body.appendChild(tempIFrame);
if (document.frames) {
// this is for IE5 Mac, because it will only
// allow access to the document object
// of the IFrame if we access it through
// the document.frames array
IFrameObj = document.frames['RSFrame'];
}
}
catch(exception) {
// This is for IE5 PC, which does not allow dynamic creation
// and manipulation of an iframe object. Instead, we'll fake
// it up by creating our own objects.
iframeHTML='\<iframe id="RSFrame" style="';
iframeHTML+='border:0px;';
iframeHTML+='width:0px;';
iframeHTML+='height:0px;';
iframeHTML+='"><\/iframe>;';
document.body.innerHTML+=iframeHTML;
IFrameObj = new Object();
IFrameObj.document = new Object();
IFrameObj.document.location = new Object();
IFrameObj.document.location.iframe = document.getElementById('RSFrame');
IFrameObj.document.location.replace = function(location) {
this.iframe.src = location;
}
}
}
if (navigator.userAgent.indexOf('Gecko') !=-1 && !IFrameObj.contentDocument) {
//give NS6 a fraction of a second
//to recognize the new IFrame
setTimeout('callToServer()',10);
return false;
}
if (IFrameObj.contentDocument) {
// For NS6
IFrameDoc = IFrameObj.contentDocument;
} else if (IFrameObj.contentWindow) {
// For IE5.5 and IE6
IFrameDoc = IFrameObj.contentWindow.document;
} else if (IFrameObj.document) {
// For IE5
IFrameDoc = IFrameObj.document;
} else {
return true;
}
IFrameDoc.location.replace(URL);
return false;
}
</script>
</FORM></P>
</div>
<!--end Form and response core-->
<div id="BotHtm" class=saveSnapshot></div>
<script>
BotHtm.style.display =('none');
</script>
<span class="hide">
<iframe id="EFrame" style="width:0;height:0px;border:0px" src="CEM.htm"></iframe></span>
<script language="vbscript">
function CRMail()
Execute("EFrame.Rmail()"
end function
</script>
<!--Customize with your with site dynamic scripts. script core-->
<p class=saveSnapshot>This is for dynamic loading of special html files into my page to include
or remove certain functionality. try build.htm, showemail.htm, and clearemail.htm</p>
<input type="text" id="ST" >
<input type="button" onclick="loadScript(url);" onfocus="url=ST.value" value="Get the page">
<iframe src="about:blank" id="RSFrame" style="DISPLAY:none"></iframe>
<script>
function CRTOS(){
var OS = document.createElement(CSO.innerHTML)
Bel.appendChild(OS)
}
var url="";
//your custom server modules for this page
function loadScript(){
document.all.RSFrame.src = url;
}
</script>
<div id="responseMessage"></div>
</BODY>
</html>
This is build.htm load it your self must be in same directory or sub folder <if sub folder> then name of sub folder\build.htm it worked for me...
<body><script>window.parent.BuildArea();</script></body>