javascript wachtwoord target/frame (Opgelost)
roy1986 - 08/05/2009 17:26 (laatste wijziging 09/05/2009 12:58)
Nieuw lid
Beste Beheerders van diverse website's
Ik zit met een script vast.
Het is namelijk zo ik wil een target invoeren maar ik kan niet vinden waar ik hem moet plaatsen.
Het zijn 2 pagina's maar bij welke pagina moet het target staan.
Target ="main" maar ik krijg hem niet daar
Dit komt in menu te staan
<html>
<head>
<title>test</title>
</head>
<body>
<SCRIPT LANGUAGE="javascript">
<!--- Hide from tired old browsers
var nifty_little_window = null;
function gateKeeper() {
nifty_little_window = window.open('wachtwoord.htm', 'theKeeper',
'width=350,height=200,resizable=1');
}
// End hiding --->
</SCRIPT>
<form>
<input type="button" value="Wachtwoord invullen" onClick="gateKeeper()"
</form>
</body>
</html>
< html>
< head>
< title> test</ title>
</ head>
< body>
< SCRIPT LANGUAGE= "javascript" >
<!--- Hide from tired old browsers
var nifty_little_window = null ;
function gateKeeper( ) {
nifty_little_window = window.open ( 'wachtwoord.htm' , 'theKeeper' ,
'width=350,height=200,resizable=1' ) ;
}
// End hiding --->
</ SCRIPT>
< form>
< input type= "button" value= "Wachtwoord invullen" onClick= "gateKeeper()"
</ form>
</ body>
</ html>
Dit is een popup
wachtwoord.htm
<HTML>
<HEAD>
<TITLE>Gate Keeper</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--- Hide from tired old browsers that should be put to pasture.
function goForit() {
var location;
var password;
password=this.document.testform.inputbox.value
location=password + ".htm"
fetch(location)
theKeeper=window.close()
}
function fetch(location) {
var root;
if (opener.closed) {
root=window.open('','theKeepersGopher','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no');
root.location.href = location;
} else {
opener.location.href = location;
}
}
// End hiding --->
</SCRIPT>
</HEAD>
<body bgcolor="#000080">
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR>
<TD ROWSPAN=2 WIDTH=50%>
<TD WIDTH=50% ALIGN=CENTER VALIGN=MIDDLE>
<FONT FACE="ARIAL" SIZE=2 color="#FFFFFF"><B>Typ u wachtwoord in.</B></FONT><BR>
<TR>
<TD WIDTH=50% ALIGN=CENTER VALIGN=BOTTOM>
<CENTER>
<FORM NAME="testform">
<INPUT TYPE="text" NAME="inputbox" VALUE="" size=20>
<INPUT TYPE="button" NAME="button" Value="Bevestig U Wachtwoord" onClick="goForit(this.form)">
</FORM>
</CENTER>
</TABLE>
</BODY>
</HTML>
< HTML>
< HEAD>
< TITLE> Gate Keeper</ TITLE>
< SCRIPT LANGUAGE= "JavaScript" >
<!--- Hide from tired old browsers that should be put to pasture.
function goForit( ) {
var location;
var password;
password= this .document .testform .inputbox .value
location= password + ".htm"
fetch( location)
theKeeper= window.close ( )
}
function fetch( location) {
var root;
if ( opener.closed ) {
root= window.open ( '' , 'theKeepersGopher' , 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no' ) ;
root.location .href = location;
} else {
opener.location .href = location;
}
}
// End hiding --->
</ SCRIPT>
</ HEAD>
< body bgcolor= "#000080" >
< TABLE BORDER= 0 CELLPADDING= 0 CELLSPACING= 0 WIDTH= 100 %>
< TR>
< TD ROWSPAN= 2 WIDTH= 50 %>
& nbsp;& nbsp;
< TD WIDTH= 50 % ALIGN= CENTER VALIGN= MIDDLE>
< FONT FACE= "ARIAL" SIZE= 2 color= "#FFFFFF" >< B> Typ u wachtwoord in .</ B></ FONT>< BR>
& nbsp;
< TR>
< TD WIDTH= 50 % ALIGN= CENTER VALIGN= BOTTOM>
< CENTER>
< FORM NAME = "testform" >
< INPUT TYPE= "text" NAME = "inputbox" VALUE= "" size= 20 >
< INPUT TYPE= "button" NAME = "button" Value= "Bevestig U Wachtwoord" onClick= "goForit(this.form)" >
</ FORM>
</ CENTER>
</ TABLE>
</ BODY>
</ HTML>
Het is de bedoeling dat hij van uit het menu waar de buten staat Wachtwoord invullen de popup opend.
En als je het juiste wachtwoord in vuld VOORBEELD test dan opend hij test.htm.
En bij een fout geeft hij pagina niet gevonden weer.
Maar hij moet hem dan openen in "main"
"menu" komt de buten voor het inlogen
"main" hier komt de pagina na een goed wachtwoord
Hier onder zo als ik mijn site heb ingedeeld
http://www.freewebs.com/kleintjerd/test/index.htm
M.v.g Roy
2 antwoorden
Gesponsorde links
dododedodo - 08/05/2009 20:35 (laatste wijziging 08/05/2009 20:36)
Lid
Ik kan eventjes je vraag niet begrijpen. Tevens heb jij html allemaal in hoofletters. Dit is dus niet gewoon. Je schrijft alles met kleine letters, en zet alle waarden van attributen tussen dubbele quotes (") dus zo:
<HTML>
<HEAD>
<TITLE>Gate Keeper</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--- Hide from tired old browsers that should be put to pasture.
function goForit() {
var location;
var password;
password=this.document.testform.inputbox.value
location=password + ".htm"
fetch(location)
theKeeper=window.close()
}
function fetch(location) {
var root;
if (opener.closed) {
root=window.open('','theKeepersGopher','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no');
root.location.href = location;
} else {
opener.location.href = location;
}
}
// End hiding --->
</SCRIPT>
</HEAD>
<body bgcolor="#000080">
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR>
<TD ROWSPAN=2 WIDTH=50%>
<td width="50%" align="center" valign="middle">
<FONT FACE="ARIAL" SIZE=2 color="#FFFFFF"><B>Typ u wachtwoord in.</B></FONT><BR>
<TR>
<TD WIDTH=50% ALIGN=CENTER VALIGN=BOTTOM>
<CENTER>
<FORM NAME="testform">
<INPUT TYPE="text" NAME="inputbox" VALUE="" size=20>
<INPUT TYPE="button" NAME="button" Value="Bevestig U Wachtwoord" onClick="goForit(this.form)">
</FORM>
</CENTER>
</TABLE>
</BODY>
</HTML>
< HTML>
< HEAD>
< TITLE> Gate Keeper</ TITLE>
< SCRIPT LANGUAGE= "JavaScript" >
<!--- Hide from tired old browsers that should be put to pasture.
function goForit( ) {
var location;
var password;
password= this .document .testform .inputbox .value
location= password + ".htm"
fetch( location)
theKeeper= window.close ( )
}
function fetch( location) {
var root;
if ( opener.closed ) {
root= window.open ( '' , 'theKeepersGopher' , 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no' ) ;
root.location .href = location;
} else {
opener.location .href = location;
}
}
// End hiding --->
</ SCRIPT>
</ HEAD>
< body bgcolor= "#000080" >
< TABLE BORDER= 0 CELLPADDING= 0 CELLSPACING= 0 WIDTH= 100 %>
< TR>
< TD ROWSPAN= 2 WIDTH= 50 %>
& nbsp;& nbsp;
< td width= "50%" align= "center" valign= "middle" >
< FONT FACE= "ARIAL" SIZE= 2 color= "#FFFFFF" >< B> Typ u wachtwoord in .</ B></ FONT>< BR>
& nbsp;
< TR>
< TD WIDTH= 50 % ALIGN= CENTER VALIGN= BOTTOM>
< CENTER>
< FORM NAME = "testform" >
< INPUT TYPE= "text" NAME = "inputbox" VALUE= "" size= 20 >
< INPUT TYPE= "button" NAME = "button" Value= "Bevestig U Wachtwoord" onClick= "goForit(this.form)" >
</ FORM>
</ CENTER>
</ TABLE>
</ BODY>
</ HTML>
Etc.
roy1986 - 08/05/2009 22:13 (laatste wijziging 09/05/2009 18:30)
Nieuw lid
ik heb even een site gemaat zie
http://www.freewebs.com/kleintjerd/test/index.htm
zo heb ik de indeling het is de bedoeling dat de popup buten blijft staan en in main de site komt te staan
de script er in gezet om het te testen elke keer bij een oplosing pas ik hem aan tot hij werkt
EDIT 09-05-2009 by roy1986
ik heb het al gevonden zie script
<HTML>
<HEAD>
<TITLE>Gate Keeper</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--- Hide from tired old browsers that should be put to pasture.
function goForit() {
var location;
var password;
password=this.document.testform.inputbox.value
location=password + ".htm"
fetch(location)
theKeeper=window.close()
}
function fetch(location) {
var root;
if (opener.closed) {
root=window.open('','theKeepersGopher','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no');
root.location.href = location;
} else {
opener.parent.main.location.href = location;
}
}
// End hiding --->
</SCRIPT>
</HEAD>
<body bgcolor="#000080">
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR>
<TD ROWSPAN=2 WIDTH=50%>
<TD WIDTH=50% ALIGN=CENTER VALIGN=MIDDLE>
<FONT FACE="ARIAL" SIZE=2 color="#FFFFFF"><B>Typ u wachtwoord in.<br>Klik dan op Bevestig U Wachtwoord</B></FONT><BR>
<TR>
<TD WIDTH=50% ALIGN=CENTER VALIGN=BOTTOM>
<CENTER>
<FORM NAME="testform">
<INPUT TYPE="text" NAME="inputbox" VALUE="" size=20>
<INPUT TYPE="button" NAME="button" Value="Bevestig U Wachtwoord" onClick="goForit(this.form)">
</FORM>
</CENTER>
</TABLE>
</BODY>
</HTML>
< HTML>
< HEAD>
< TITLE> Gate Keeper</ TITLE>
< SCRIPT LANGUAGE= "JavaScript" >
<!--- Hide from tired old browsers that should be put to pasture.
function goForit( ) {
var location;
var password;
password= this .document .testform .inputbox .value
location= password + ".htm"
fetch( location)
theKeeper= window.close ( )
}
function fetch( location) {
var root;
if ( opener.closed ) {
root= window.open ( '' , 'theKeepersGopher' , 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no' ) ;
root.location .href = location;
} else {
opener.parent .main .location .href = location;
}
}
// End hiding --->
</ SCRIPT>
</ HEAD>
< body bgcolor= "#000080" >
< TABLE BORDER= 0 CELLPADDING= 0 CELLSPACING= 0 WIDTH= 100 %>
< TR>
< TD ROWSPAN= 2 WIDTH= 50 %>
& nbsp;& nbsp;
< TD WIDTH= 50 % ALIGN= CENTER VALIGN= MIDDLE>
< FONT FACE= "ARIAL" SIZE= 2 color= "#FFFFFF" >< B> Typ u wachtwoord in .< br> Klik dan op Bevestig U Wachtwoord</ B></ FONT>< BR>
& nbsp;
< TR>
< TD WIDTH= 50 % ALIGN= CENTER VALIGN= BOTTOM>
< CENTER>
< FORM NAME = "testform" >
< INPUT TYPE= "text" NAME = "inputbox" VALUE= "" size= 20 >
< INPUT TYPE= "button" NAME = "button" Value= "Bevestig U Wachtwoord" onClick= "goForit(this.form)" >
</ FORM>
</ CENTER>
</ TABLE>
</ BODY>
</ HTML>
Gesponsorde links
Dit onderwerp is gesloten .