/    Sign up×
Community /Pin to ProfileBookmark

Make textboxes appear on window

[CODE][FONT=”Fixedsys”][code=html]<HTML>
<HEAD>
<META NAME=”GENERATOR” Content=”Microsoft Visual Studio 6.0″>
<TITLE></TITLE>
<SCRIPT LANGUAGE=javascript>
<!–
var winParent;
function newWindow(strWin,strURL,intX,intY,intWidth,intHeight){
winParent =window.open(strURL,strWin,’left=’ + intX + ‘, screenX =’ + intX + ‘, top=’ + intY + ‘, screenY=’ + intY + ‘, width=’ + intWidth + ‘, height=’ + intHeight + ‘, scrollbars=yes, toolbar=yes’);
}
function closeParent(){
if(winParent){
winParent.close();
}
}
//–>
</SCRIPT>

</HEAD>

<BODY onFocus=”closeParent();”>
<form>
<B>ENTER YOUR SUBJECT</B><INPUT TYPE=”TEXT” NAME=”subject”>
<INPUT type=”button” value=”Open Window” name=button1 onClick=newWindow(‘winParent’,’parent.htm’,0,0,200,200)>
<form>
</BODY>
</HTML>[/code]

[/FONT][/CODE]

[CODE][code=html]<HTML>
<HEAD>
<META NAME=”GENERATOR” Content=”Microsoft Visual Studio 6.0″>
<TITLE></TITLE>
<SCRIPT LANGUAGE=javascript>
<!–
var winChild;
displayColor();
function newWindow(strWin,strURL,intX,intY,intWidth,intHeight){
winChild =window.open(strURL,strWin,’left=’ + intX + ‘, screenX =’ + intX + ‘, top=’ + intY + ‘, screenY=’ + intY + ‘, width=’ + intWidth + ‘, height=’ + intHeight + ‘, scrollbars=yes, toolbar=yes’);

}

function displayColor() {

var m=0;
var fSubject = self.opener.document.forms[0].subject.value;
if(fSubject.length>0){
if(isNaN(fSubject)){fSubject=””;}
else{opener.alert(“Please enter figure”);}
numSub=parseInt(fSubject);
if(numSub==2){var strSub=”abcde”;}
self.document.write(“<center>” +”ENTER SUBJECT HERE” +”</center><br>”);
var mercy=”<HTML><BODY>”
mercy +=”<CENTER>”
sub=new Array(strSub.length);
for(var i=0; i<sub.length; i++){
m++;
mercy +=m +”<input type=’text’ name=’sub[i].toLowerCase()’>” +”<BR>”;
opener.alert(“You have entered” +m +”subjects”);
}
}
mercy +=”</CENTER></FORM></BODY></HTML><BR></BR>”;
self.document.write(mercy +”<BR>”);
self.document.bgColor=”pink”;
}
function closeChild(){
if(winChild){
winChild.close();
}
}

//–>
</SCRIPT>

</HEAD>
<BODY onFocus=”closeChild();” onUnLoad=”closeChild()”>
<form>
<INPUT type=”button” value=”Open Window” name=button1 onClick=newWindow(‘winChild’,’child.htm’,100,100,200,200)>
<form>
</BODY>
</HTML>[/code]

[/CODE]

[CODE][code=html]<HTML>
<HEAD>
<META NAME=”GENERATOR” Content=”Microsoft Visual Studio 6.0″>
<TITLE></TITLE>
<SCRIPT LANGUAGE=javascript>
<!–
var winGrandChild;
function newWindow(strWin,strURL,intX,intY,intWidth,intHeight){
winGrandChild =window.open(strURL,strWin,’left=’ + intX + ‘, screenX =’ + intX + ‘, top=’ + intY + ‘, screenY=’ + intY + ‘, width=’ + intWidth + ‘, height=’ + intHeight + ‘, scrollbars=yes, toolbar=yes’);
}
function closeGrandChild(){
if(winGrandChild){
winGrandChild.close();
}
}
//–>
</SCRIPT>

</HEAD>

<BODY onFocus=”closeGrandChild();” onUnload=”closeGrandChild();”>
<form>
<INPUT type=”button” value=”Open Window” name=button1 onClick=newWindow(‘winGrandChild’,’grandchild.htm’,200,200,200,200)>
<form>
</BODY>
</HTML>[/code]

[/CODE]

Can you please help me solve this. When I open the second window it is suppose to open with two text boxes in it, but it does not, it closes before the second click. Thanks. God bless.

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @ken2010 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...