HTML-Interface
Ursache Vladimir Jan 15, 2003
This is a simple HTML-Interface that allows you to check the code (HTML or JavaScript) in less than 1 second. If you like HTML or JavaScript then this interface is for you! Works in MSIE and Opera.
CHECK THE CODE
OPEN THE newWin
CLEAR FIELD ABOVE
CLEAR newWin
RESTART COUNTER
Code checked 0 times
The JavaScript Source: Miscellaneous: HTML-Interface
Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!
<!-- TWO STEPS TO INSTALL HTML-INTERFACE:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://www.javascriptsource.com -->
<!-- Original: Ursache Vladimir (vlad783@yahoo.com) -->
<!-- Web Site: http://www.geocities.com/vlad783 -->
<SCRIPT LANGUAGE=JavaScript>
if(!(document.all))
{
alert("TESTED ONLY ON MSIE");
}
var high = screen.height - 10;
var wide = screen.width - 10;
var myFe_s="HEIGHT=" +high+ ",width=" +wide+ ",resizable=yes,scrollbars=yes";
var newWin=window.open("","newWindow",myFe_s);
self.focus();
var myVar=0;
function btopen_newWin()
{
if(newWin.closed==true)
{
var myFe_s="HEIGHT=500,width=700,resizable=yes,scrollbars=yes";
newWin=window.open("","newWindow",myFe_s);
}
else
{
alert("Sorry, but the newWin is already open");
}
} //E O F
function btclear_newWin()
{
if(newWin.closed==false)
{
newWin.document.open("text/html");
newWin.document.write("");
newWin.document.close();
}
else
{
alert("Sorry, but 1st u hv 2 open da newWin");
}
} // E O F
function btclear_txtArea()
{
var myConf=confirm("D'u really want that?");
if(myConf)
{
document.form1.txtArea.value="";
}
} // E O F
function btcheck_newWin()
{
if (newWin.closed==false)
{
newWin.focus(); //50
myVar++;
myVarValue();
var m;
m=document.form1.txtArea.value;
newWin.document.write(m);
newWin.document.close();
}
else
{
alert("Open the newWin again");
}
} // E O F
function myVarValue()
{
myDiv.innerHTML="<H3>Code checked "+myVar+" times</H3>";
} // E O F
function btclear_myVar()
{
myVar=0;
myVarValue();
} // E O F
function oover(theDiv)
{
theDiv.style.color = "black";
theDiv.style.cursor = "hand";
theDiv.style.backgroundColor = "silver";
}
function oout(theDiv)
{
theDiv.style.color = "green";
theDiv.style.backgroundColor = "skyblue";
}
function inn(bla,min,max)
{
var truth;
if((bla == "") || isNaN(bla)) { truth = false; }
else
{
bla = parseInt(bla);
if((bla > max) || (bla < min)) { truth = false; }
else { truth = true; }
}
return truth;
} // E O F
function btbigger()
{ //100
var mRows;
var mCols;
var mSize;
var mCode="";
var finalRows = 15;
var finalCols = 60;
var finalSize = 15;
mRows = document.form2.rowsNumber.value;
mCols = document.form2.colsNumber.value;
mSize = document.form2.mNewSize.value;
if(inn(mRows,10,100)) { finalRows = mRows; }
if(inn(mCols,20,100)) { finalCols = mCols; }
if(inn(mSize,5,40)) { finalSize = mSize; }
mCode = document.form1.txtArea.value;
fortxtArea.innerHTML = '<TEXTAREA NAME=txtArea WRAP=OFF ROWS=' +finalRows+
' COLS=' +finalCols+ ' STYLE="font-size:' +finalSize+ 'px;"> </TEXTAREA>';
document.form2.rowsNumber.value = "ROWS";
document.form2.colsNumber.value = "COLS";
document.form2.mNewSize.value = "FONT-SIZE";
document.form1.txtArea.value = mCode;
document.form1.txtArea.focus();
} // E O F
function kp()
{
if(event.keyCode == 9)
{ btcheck_newWin();
return false;
}
}
document.onkeydown=kp;
function bttips()
{
tip.innerHTML="<H3>1.When you want to check the code you can press the key 'TAB' too.<BR>"+
"2. After checking the code a lot of times be sure to save it somewhere, coz until that moment"+
" the whole code will be Lost once the browser is closed, coz the code is actually in the"+
"'BUFFER-ZONE'<BR>"+
"3. For questions you can ask me (author) at vlad783@yahoo.com";
setTimeout("tip.innerHTML=''", 20000);
} // E O F
</SCRIPT>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://www.javascriptsource.com -->
<!-- Original: Ursache Vladimir (vlad783@yahoo.com) -->
<!-- Web Site: http://www.geocities.com/vlad783 -->
<TABLE>
<TR>
<TD>
<FORM NAME="form1">
<DIV ID=fortxtArea>
<TEXTAREA NAME="txtArea" WRAP=off ROWS=15 COLS=60 STYLE="font-size:15px;">
</TEXTAREA>
</DIV>
</TD>
</TR>
</TABLE>
<TABLE BGCOLOR=skyblue CELLPADDING=4 BORDER=2>
<TR>
<TD>
<DIV ID="myDiv1"
STYLE="color:green;"
onmouseover="oover(myDiv1)"
onmouseout="oout(myDiv1)"
onclick="btcheck_newWin()">
CHECK THE CODE
</DIV>
</TD>
<TD>
<DIV ID="myDiv2"
STYLE="color:green;"
onmouseover="oover(myDiv2)"
onmouseout="oout(myDiv2)"
onclick="btopen_newWin()">
OPEN THE newWin
</DIV>
</TD>
</TR>
<TR>
<TD>
<DIV ID="myDiv3"
STYLE="color:green;"
onmouseover="oover(myDiv3)"
onmouseout="oout(myDiv3)"
onclick="btclear_txtArea()">
CLEAR FIELD ABOVE
</DIV>
</TD>
<TD>
<DIV ID="myDiv4"
STYLE="color:green;"
onmouseover="oover(myDiv4)"
onmouseout="oout(myDiv4)"
onclick="btclear_newWin()">
CLEAR newWin
</DIV>
</TD>
</TR>
<TR>
<TD>
<DIV ID="myDiv5"
STYLE="color:green;"
onmouseover="oover(myDiv5)"
onmouseout="oout(myDiv5)"
onclick="btclear_myVar()">
RESTART COUNTER
</DIV>
</FORM>
</TD>
</TR>
</TABLE>
<H3><DIV ID="myDiv">Code checked 0 times</DIV> </H3>
<FORM NAME=form2>
<INPUT TYPE=text VALUE=ROWS NAME=rowsNumber ONFOCUS='document.form2.rowsNumber.value=""'><BR>
<INPUT TYPE=text VALUE=COLS NAME=colsNumber ONFOCUS='document.form2.colsNumber.value=""'><BR>
<INPUT TYPE=text VALUE="FONT-SIZE" NAME=mNewSize ONFOCUS='document.form2.mNewSize.value=""'><BR>
<INPUT TYPE=button VALUE=OK onclick="btbigger()">
<INPUT TYPE=button VALUE=DEFAULT onclick="window.location.reload()">
<INPUT TYPE=button VALUE="3 TIPS" onclick="bttips()">
</FORM>
<DIV ID=tip></DIV>
<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
<!-- Script Size: 6.52 KB --> Did you use this script? Do you like this site? Please link to us!
Leave a Response
(0 comments)