====================first window===========================
<html>
<head>
<script language=”javascript”>
var newWindow;
function call() {
newWindow=window.open(“gagut.html”, “gagut”)
}
</script>
</head>
<body>
<form>
MATHEMATICS <INPUT TYPE=”TEXT” NAME=”math” SIZE=”5″><br>
ENGLISH <INPUT TYPE=”TEXT” NAME=”eng” SIZE=”5″><br>
<br>
<input type=”button” name=”add” value=”RESULT” onClick=”call()”>
</form>
</body>
</html>
===================second window===========================
<html>
<head>
<script language=”javascript”>
function getIt() {
var fMath=self.opener.document.forms[0].math.value;
strMath=fMath.toUpperCase();
if(strMath.length==0) {
opener.alert(“Please enter score for Mathematics”);
}
if(isNaN(strMath)) {
opener.alert(“Please enter figure for Mathematics”);
//strMath=””;
}
var goodness=”<HTML><BODY><CENTER><TABLE CELLPADDING=0, CELLSPACING=15 BGCOLOR=BLUE>”
goodness +=”<CAPTION><ALIGN=TOP><B><U><FONT COLOR=MAROON> SUBJECT / SCORE ” +”</FONT></U></B></CAPTION>”
if(strMath.length==0) {
strMath=0;
goodness +=”<TR><TD ALIGN=RIGHT><B>MATHEMATICS :<B></TD>” +”<TD><I>” +”ABSENT” +”</I></TD>”;
}
else{
goodness +=”<TR><TD ALIGN=RIGHT><B>MATHEMATICS <B></TD>” +”<TD><I>” +strMath +”</I></TD>”;
}
//——————-validating English values————————+
var fEng=self.opener.document.forms[0].eng.value;
strEng=fEng.toUpperCase();
if(strEng.length==0) {
opener.alert(“Please enter score for English”);
}
if(isNaN(strEng)) {
opener.alert(“Please enter figure for English”);
//strEng=””;
}
if(strEng.length==0) {
strEng=0;
goodness +=”<TD ALIGN=RIGHT><B>ENGLISH <B></TD>” +”<TD><I>” +”ABSENT” +”</I></TD></TR>”;
}
else{
goodness +=”<TD ALIGN=RIGHT><B>ENGLISH <B></TD>” +”<TD><I>” +strEng +”</I></TD></TR>”;
}
goodness +=”</TABLE></CENTER></BODY></HTML><BR></BR>”;
document.myForm.textMe.value = goodness;
document.myForm.textMe.style.color=”red”
//document.myForm.textMe.style.face=”verdana”
/*var result, nMath, nEng;
nMath=parseInt(strMath);
nEng=parseInt(strEng);
result = nMath+nEng;*/
}
</script>
</head>
<body onLoad=”getIt()”>
<form name=”myForm”>
<textarea name=”textMe” cols=30 rows=30 readonly></textarea><br>
<input type=”button” name=”submit” value=”SUBMIT”>
</form>
</body>
</html>
thanks. Please this i need your help for,. When i input data from the first window it appears in the textarea of the second window retrieving the table tags, this is not what i want. i want the the table to come out as a table and the content from the first window to appear in the table, in the textarea of the second window with color blue and font face – lucida console like this:
MATHEMATICS 60
ENGLISH 70
RESULT 130
Thanks. God bless. If html can not appear in textarea , please help me out with the best way to go about it.