jlsmithhartfiel
Programmer
Hi!
I have a cool htm file that uses javascript to open another htm page based on what you type in a text box.
I'd like to do the same to open an asp page from what I type in a text box.
Reason why I want this:
1. remote debugging of customer site
2. do not have ftp access, and they do not want me to write to the production servers
I'm having trouble with this...I can get the text displayed in another window, but it won't render it. Any ideas?
TIA,
Jessica
=======================
initial page
it writes what you have to frame at right; I also have it opening a new window in hopes that it would magically work
All credits to:
/* Created by Hezekiel Randolph * * uniment.tripod.com *
\* anon4016@yahoo.com */
=======================
=======================
sample text to put into text box.
=======================
=======================
Jessica![[ponytails2] [ponytails2] [ponytails2]](/data/assets/smilies/ponytails2.gif)
I have a cool htm file that uses javascript to open another htm page based on what you type in a text box.
I'd like to do the same to open an asp page from what I type in a text box.
Reason why I want this:
1. remote debugging of customer site
2. do not have ftp access, and they do not want me to write to the production servers
I'm having trouble with this...I can get the text displayed in another window, but it won't render it. Any ideas?
TIA,
Jessica
=======================
initial page
it writes what you have to frame at right; I also have it opening a new window in hopes that it would magically work
All credits to:
/* Created by Hezekiel Randolph * * uniment.tripod.com *
\* anon4016@yahoo.com */
=======================
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>
ASPMaker
</title>
</head>
<script type="text/javascript">
<!--
/* Created by Hezekiel Randolph * * uniment.tripod.com *
\* anon4016@yahoo.com */
/*
HTMaker Script
IE 4+ | NS 4+ | Mozilla 0.x | Opera 5+ | Icab -- Sorry, it makes Icab frown ;-(
Konquerer 2.1.1 (Using KDE 2.1.2) has been tested, doesn't work.
Other browsers not tested.
*/
// Query:
var q=new Array();
q.string=location.search.substring(1,location.search.length);
q.toString=function() {return this.string;};
q.pairs=q.string.split('&');
for (var i = 0; i < q.pairs.length; i++) {
var cp=q.pairs[i].split("=");
q[cp[0]]=q[i]=unescape(cp[1]);
}
// universal Variables:
var l, r, lo, ld, rd, ldt;
var ie = document.all?1:0;
var ns = document.layers?1:0;
var dom = (!ie && document.getElementById)?1:0;
var lForm = 'document.'+(ie?'all':'forms.Z');
var lTxet = lForm+'.txet';
var txetSrc = "";
// left frame source:
{
var src =
'<'+'!DOCTYPE html PUBLIC "-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN">'+
// IE (6 and earlier) doesn't support CSS with an XHTML doctype,
// so it's an HTML doctype instead.
'<html><head><title><\/title><style><'+'!--\n'+
// Title to keep Icab from frowning
'input {font:menu;}'+
'textarea {font-family: lucida console; font-size: 12px;}'+
'--'+'><\/style><\/head><body bgcolor="#fff3dd">'+
(ie?'':'<form name="Z">')+
'<textarea name="txet"'+(dom?'':' rows="20" cols="44" wrap="off"')+' style="height:90%;width:100%">'+
txetSrc+
'<\/textarea>'+
'<input type="button" value="Test Source" accesskey="a" onclick="parent.document.maket('+lTxet+'.value);'+lTxet+'.focus();">'+
(ie?'':'<\/form>')+
'<\/body><\/html>';
document.leftSrc = src;
}
function main() { // Call function main because frameset's don't accept scripts.
if (!window.frames || !frames[0] || !frames[0].document) {
alert('Sorry, but your browser cannot handle this application.');
return 0;
}
// Initialize universal frame variables:
l = frames[0];
r = frames[1];
lo = frames[2];
ld = frames[0].document;
rd = frames[1].document;
// Initialize left frame:
setLeft();
if (typeof lo.document.load == "function")
lo.document.load();
}
function setLeft() {
var okay = 1;
if (ns) okay = checkLeft();
if (okay) {
ldt = eval('frames[0].'+lTxet);
}
}
// Function tests if Netscape failed to write left frame
// correctly: if failed, fixes it (bug found in NS 4.08; I haven't tested
// other document.layers-accepting browsers. If still failed, alerts user
function checkLeft() {
ld = frames[0].document;
if (!ld.Z || !ld.Z.txet) {
ld.write('');
ld.close();
}
ld = frames[0].document;
if (!ld.Z || !ld.Z.txet) {
window.alert("There has been an error loading HTMaker.");
return 0;
}
else return 1;
}
document.maket=function(myHTML) {
myHTML=escape(escape(myHTML));
setTimeout("rd.open();rd.write(unescape(unescape('"+myHTML+"')));rd.close();document.setTitle(rd.title);",0);
jls = window.open("avgprice2.asp");
jls.document.open();
jls.document.write(unescape(unescape(myHTML)));
jls.document.close();
//setTimeout("rd.location=\"javascript:(unescape(unescape('"+myHTML+"')));\"",0);
}
document.setTitle=function(myTitle) {
var re=/^\s*$/;
if (!re.test(myTitle))
document.title=myTitle + " -- HTMaker";
else
document.title="HTMaker";
}
document.changeValue=function(txetSrc) {
ldt.value=txetSrc;
}
// -->
</script>
<noscript>
<p>
You need a JavaScript-Enabled Browser to run this application,
<Br>
preferrably Mozilla (Netscape 6.x) or the latest version of Internet Explorer.
</p>
<p>
<a href="[URL unfurl="true"]http://www.mozilla.org">Mozilla</a>,[/URL] what Netscape 6 is founded on
</p>
<p>
<a href="[URL unfurl="true"]http://www.microsoft.com">Microsoft</a>,[/URL] the makers of Internet Explorer.
</p>
</noscript>
<!---><!--->
<frameset cols="50%,*,0" onload="main()">
<frame name="lefty" src="javascript:parent.document.leftSrc;">
<frame name="righty" src="javascript:'<html><body><\/body><\/html>'">
<frame name="loader" src="javascript:parent.q.load?void(location=parent.q.load):''" noresize="noresize">
</frameset>
</html>
sample text to put into text box.
=======================
Code:
<% @language = vbscript %>
<%
Option Explicit
' Declare variables
dim iRows, iCols
iRows = "5"
iCols = "10"
%>
<html>
<head>
<title>test page</title>
</head>
<body>
test page<br>
<%=iRows%> by <%=iCols%>
</body>
</html>
Jessica
![[ponytails2] [ponytails2] [ponytails2]](/data/assets/smilies/ponytails2.gif)