document.write in ein neues Fenster
Don Pinguino
0 random
Hi,
ich habe ein kleines Problem was für die Profis bestimmt easy ist.
Ich will die Eingaben in einem Formular überprüfen lassen.
mit document.write schreibe ich die falschen Eingaben in ein neues Fenster, allerdings verschwindet dann aber alter Fensterinhalt.
Ich möchte aber nun das document.write ein neues Fenster aufmacht aber das alte auch da bleibt.
Ich habe auch schon mit document.open versucht aber es kommt zum gleichen effekt.
Gibt es vielleicht für document.write irgendwelche Parameter.
Hier mein Quellcode aber ohne document.open und window.open usw...
Ja es sieht premetiv aus ....
function pruefung()
{
var firma,firma1,ansprechpartner,strasse,plz,ort,email,telefon,mitteilung;
firma = document.kontakt.firma.value;
firma1 = document.kontakt.firma1.value;
ansprechpartner = document.kontakt.ansprechpartner.value;
strasse = document.kontakt.strasse.value;
plz = document.kontakt.plz.value;
ort = document.kontakt.ort.value;
email = document.kontakt.email.value;
homepage = document.kontakt.homepage.value;
telefon = document.kontakt.telefon.value;
fax = document.kontakt.fax.value;
mitteilung = document.kontakt.mitteilung.value;
document.writeln("<HTML><HEAD><TITLE>Online Kontakt zu SACO</TITLE></HEAD>");
document.writeln("<BODY background=../../bilder/backgrounds/puzzle6.jpg bgProperties=fixed leftmargin=30 topMargin=30 onLoad=window.resizeTo(580,420)>");
document.writeln("<H3>Online Kontakt zu SACO</H3>");
document.writeln("<STYLE type=text/css> BODY {COLOR: #00009c; FONT-FAMILY: ARIAL; FONT-SIZE: 14px; FONT-WEIGHT: normal; TEXT-DECORATION: none} A:active {COLOR: #00009c; FONT-FAMILY: ARIAL; FONT-SIZE: 14px; FONT-WEIGHT: normal; TEXT-DECORATION: none} </STYLE>");
document.writeln("<form action=mailto:info@saco-gmbh.de name=kontakt>");
if(ansprechpartner=="" strasse=="" plz=="" ort=="" email=="" telefon=="" mitteilung=="")
{
document.writeln("Sie haben vergessen unten stehende Formularfelder auszufüllen, die für die Bearbeitung unbedingt notwendig sind !!!");
document.writeln("<br><br>");
if(ansprechpartner=="")
{
document.writeln(" Formularfeld: <b>Ansprechpartner</b><br>");
}
if(strasse=="")
{
document.writeln(" Formularfeld: <b>Straße</b><br>");
}
if(plz=="")
{
document.writeln(" Formularfeld: <b>PLZ</b><br>");
}
if(ort=="")
{
document.writeln(" Formularfeld: <b>Ort</b><br>");
}
if(email=="")
{
document.writeln(" Formularfeld: <b>eMail</b><br>");
}
if(telefon=="")
{
document.writeln(" Formularfeld: <b>Telefonnummer</b><br>");
}
if(mitteilung=="")
{
document.writeln(" Formularfeld: <b>Ihre Mitteilung</b><br>");
}
document.writeln("<br><br> Klicken Sie auf die Schaltfläche <b>Zurück</b> um die Formularfelder zu vervollständigen");
document.writeln("<br><br> <INPUT name=zurueck type=submit value=Zurück onClick=window.location.href='javascript:history.back(1);'>");
}
if(ansprechpartner!="" && strasse!="" && plz!=="" && ort!="" && email!="" && telefon!="" && mitteilung!="")
{
document.writeln("Ihre Eingaben werden nochmal zur Überprüfung angezeigt !!!<br><br>");
document.writeln("<table width=100% border=0><tr><td widht=25% bgColor=#eeeeee>Anrede</td><td width=75% bgColor=#eeeeee>"+firma+"</td></tr>");
document.writeln("<tr><td width=25%>Firma</td><td width=75%>"+firma1+"</td></tr>");
document.writeln("<tr><td width=25% bgColor=#eeeeee>Ansprechpartner</td><td width=75% bgColor=#eeeeee>"+ansprechpartner+"</td></tr>");
document.writeln("<tr><td width=25%>Straße</td><td width=75%>"+strasse+"</td></tr>");
document.writeln("<tr><td width=25% bgColor=#eeeeee>PLZ, Ort</td><td width=75% bgColor=#eeeeee>"+plz+" "+ort+"</td></tr>");
document.writeln("<tr><td width=25%>eMail</td><td width=75%>"+email+"</td></tr>");
document.writeln("<tr><td width=25% bgColor=#eeeeee>Homepage</td><td width=75% bgColor=#eeeeee>"+homepage+"</td></tr>");
document.writeln("<tr><td width=25%>Telefonnummer</td width=75%><td>"+telefon+"</td></tr>");
document.writeln("<tr><td width=25% bgColor=#eeeeee>Faxnummer</td><td width=75% bgColor=#eeeeee>"+fax+"</td></tr>");
document.writeln("<tr><td width=25%>Ihre Mitteilung</td><td width=75%>"+mitteilung+"</td></tr></table>");
document.writeln("<br><hr><br> <INPUT name=zurueck type=submit value=Zurück onClick=window.location.href='javascript:history.back(1);'>");
document.writeln(" <INPUT name=senden type=submit value=Senden>");
document.writeln("</form>");
}
}
hallo!
ich möchte nicht weiten auf den ellenlangen quelltext eingehen sondern gleich zu sachen kommen!
also, ein fenster in javascript öffnen:
formfenster = open(...); // für ... siehe <../../tecb.htm#a35>;
ins fremde fenster schreiben:
formfenster.document.write("..."); // für ... steht der seitenquelltext
fenster wieder schließen:
formfenster.close(); // schließt formfenster
random
Danke !!!!
hallo!
ich möchte nicht weiten auf den ellenlangen quelltext eingehen sondern gleich zu sachen kommen!
also, ein fenster in javascript öffnen:formfenster = open(...); // für ... siehe <../../tecb.htm#a35>;
ins fremde fenster schreiben:
formfenster.document.write("..."); // für ... steht der seitenquelltext
fenster wieder schließen:
formfenster.close(); // schließt formfenster
random