• Das Erstellen neuer Accounts wurde ausgesetzt. Bei berechtigtem Interesse bitte Kontaktaufnahme über die üblichen Wege. Beste Grüße der Admin

Formular mit Erfolgsmeldung im Popup

senna94

New member
hallo
habe ein Problem mit einem Formular, das bei Anklick in einem Popup-Fenster mt 500x500 zentriert aufgeht. Nach dem Ausfüllen des Formulars, das übrigends wunderbar funftioniert, wird die erfolg.html gesendet, das alles versendet wurde. Ich möchte aber nun, das die Seite erfolg.html nicht im ganzen Browser aufgeht, sondern auch in diesem Popup-Fenster vom Formular.

Danke euch im Vorau
senna94
 
Moin!

Und den Code, den Du schon hast, soll hier erstmal jemand nachbasteln?

Ahoi - Pit
 
Hallo
Hier der Code für das Popup mit dem Formular in php:
PHP:
<?
error_reporting(0);
@session_start();
$nof_suiteName="EmailPage";
$nof_debug = "true";
$nof_langFile = "../scripts/EmailPage_de.properties";
$nof_rootDir = "..";
$nof_scriptDir = "scripts";
?>
<?
if (!file_exists($nof_langFile) || !file_exists($nof_rootDir . "/" . $nof_scriptDir . "/" . "nof_utils.inc.php")) {
if($nof_debug == "true") {
echo "<p>Die für die Suite <b>send</b> benötigten Komponenten werden nicht veröffentlicht. Bitte überprüfen Sie die Veröffentlichungseinstellungen in Fusion und veröffentlichen Sie die Site erneut.</p>";
} else {
echo "<p>Ein Fehler ist aufgetreten.Bitte wenden Sie sich an den Site-Administrator.</p><p>Fehlercode: 103</p>";
}
exit();
}

require_once($nof_rootDir . "/" . $nof_scriptDir . "/" . "nof_utils.inc.php");
$nof_resources->addFile($nof_langFile);
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>email</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="Generator" content="NetObjects Fusion 9 for Windows">
<link rel="stylesheet" type="text/css" href="../html/style.css">
<link rel="stylesheet" type="text/css" href="../html/site.css">
<script type="text/javascript">
<!--
var hwndPopup_27b5;
function openpopup_27b5(url){
var popupWidth = 500;
var popupHeight = 500;
var popupTop = 300;
var popupLeft = 300;
var isFullScreen = false;
var isAutoCenter = true;
var popupTarget = "popupwin_27b5";
var popupParams = "toolbar=0, scrollbars=0, menubar=0, status=0, resizable=0";

if (isFullScreen) {
	popupParams += ", fullscreen=1";
} else if (isAutoCenter) {
	popupTop	= parseInt((window.screen.height - popupHeight)/2);
	popupLeft	= parseInt((window.screen.width - popupWidth)/2);
}

var ua = window.navigator.userAgent;
var isMac = (ua.indexOf("Mac") > -1);

//IE 5.1 PR on OSX 10.0.x does not support relative URLs in pop-ups the way they're handled below w/ document.writeln
if (isMac && url.indexOf("http") != 0) {
  url = location.href.substring(0,location.href.lastIndexOf('\/')) + "/" + url;
}

var isOpera = (ua.indexOf("Opera") > -1);
var operaVersion;
if (isOpera) {
	var i = ua.indexOf("Opera");
	operaVersion = parseFloat(ua.substring(i + 6, ua.indexOf(" ", i + 8)));
	if (operaVersion > 7.00) {
		var isAccessible = false;
		eval("try { isAccessible = ( (hwndPopup_27b5 != null) && !hwndPopup_27b5.closed ); } catch(exc) { } ");
		if (!isAccessible) {
			hwndPopup_27b5 = null;
		}
	}
}
if ( (hwndPopup_27b5 == null) || hwndPopup_27b5.closed ) {
	
	if (isOpera && (operaVersion < 7)) {
		if (url.indexOf("http") != 0) {
			hwndPopup_27b5 = window.open(url,popupTarget,popupParams + ((!isFullScreen) ? ", width=" + popupWidth +", height=" + popupHeight : ""));
			if (!isFullScreen) {
				hwndPopup_27b5.moveTo(popupLeft, popupTop);
			}
			hwndPopup_27b5.focus();
			return;
		}
	}
	if (!(window.navigator.appName == "Netscape" && !document.getElementById)) {
		//not ns4
		popupParams += ", width=" + popupWidth +", height=" + popupHeight + ", left=" + popupLeft + ", top=" + popupTop;
	} else {
		popupParams += ", left=" + popupLeft + ", top=" + popupTop;
	}
	//alert(popupParams);
	hwndPopup_27b5 = window.open("",popupTarget,popupParams);
	if (!isFullScreen) {
		hwndPopup_27b5.resizeTo(popupWidth, popupHeight);
		hwndPopup_27b5.moveTo(popupLeft, popupTop);
	}
	hwndPopup_27b5.focus();
	with (hwndPopup_27b5.document) {
		open();
		write("<ht"+"ml><he"+"ad><\/he"+"ad><bo"+"dy onLoad=\"window.location.href='" + url + "'\"><\/bo"+"dy><\/ht"+"ml>");
		close();
	}
} else {
	if (isOpera && (operaVersion > 7.00)) {
		eval("try { hwndPopup_27b5.focus();	hwndPopup_27b5.location.href = url; } catch(exc) { hwndPopup_27b5 = window.open(\""+ url +"\",\"" + popupTarget +"\",\""+ popupParams + ", width=" + popupWidth +", height=" + popupHeight +"\"); } ");
	} else {
		hwndPopup_27b5.focus();
		hwndPopup_27b5.location.href = url;
	}
}

}

-->
</script>
</head>
<body style="margin: 0px;">
 <table border="0" cellspacing="0" cellpadding="0" width="514">
  <tr valign="top" align="left">
   <td width="46" height="37"><img src="../assets/images/autogen/clearpixel.gif" width="46" height="1" border="0" alt=""></td>
   <td></td>
  </tr>
  <tr valign="top" align="left">
   <td height="326"></td>
   <td width="468">
<?
if (NOF_fileExists("../scripts/ep_sendhtmlmail.php")) {
?>

<!-- <img id="NOFEmailPage1" height="326" width="468" src="../assets/images/EmailPageIcon.gif" border="0" alt=""> -->
<form accept-charset='UNKNOWN' method='POST' target='_self' action='../scripts/ep_sendhtmlmail.php' name='emailpage1167776393718' enctype='application/x-www-form-urlencoded'><input type="hidden" name="nof_scriptInterfaceFile" value="EmailPage1167776399406.xml.php">
<input type="hidden" name="nof_rootDir" value="..">
<input type="hidden" name="nof_scriptDir" value="scripts">
<input type="hidden" name="nof_langFile" value="EmailPage_de.properties">
<input type="hidden" name="nof_debug" value="true">
<input type="hidden" name="nof_componentId" value="1167776393718">
<input type="hidden" name="popup" value="false">
<script type="text/javascript">
if (window.opener != null) {
document.writeln('<input type="hidden" name="TargetPage" value="'+ window.opener.location.href + '">');
document.emailpage1167776393718.popup.value = "true";
}
else if ( document.referrer != null && document.referrer != "" ) {
document.writeln('<input type="hidden" name="TargetPage" value="' + document.referrer + '">');
}
else {
document.writeln('<input type="hidden" name="TargetPage" value="'+ window.document.location.href + '">');
}
</script>
<table><tr><td nowrap><span class=''>Von Name</span></td><td nowrap><? if(isset($_POST["1167776393718_fromNameField_errorimg"])) echo stripslashes($_POST["1167776393718_fromNameField_errorimg"]); ?></td><td><input size='30' value='' class='' name='fromNameField' maxlength='60' type='TEXT'></td></tr><tr><td nowrap><span class=''>Von Email</span></td><td nowrap><? if(isset($_POST["1167776393718_fromField_errorimg"])) echo stripslashes($_POST["1167776393718_fromField_errorimg"]); ?></td><td><input size='30' value='' class='' name='fromField' maxlength='60' type='TEXT'></td></tr><tr><td nowrap><span class=''>An Email</span></td><td nowrap><? if(isset($_POST["1167776393718_toField_errorimg"])) echo stripslashes($_POST["1167776393718_toField_errorimg"]); ?></td><td><input size='30' value='' class='' name='toField' maxlength='60' type='TEXT'></td></tr><tr><td nowrap><span class=''>Betreff</span></td><td nowrap><? if(isset($_POST["1167776393718_subjectField_errorimg"])) echo stripslashes($_POST["1167776393718_subjectField_errorimg"]); ?></td><td><input size='30' value='Neue Website!' class='' name='subjectField' maxlength='60' type='TEXT'></td></tr><tr><td nowrap><span class=''>Meldung</span></td><td nowrap><? if(isset($_POST["1167776393718_messageField_errorimg"])) echo stripslashes($_POST["1167776393718_messageField_errorimg"]); ?></td><td><textarea rows='4' class='' name='messageField' cols='30'>Diesen Link!!</textarea></td></tr><tr><td nowrap><span class=''>E-Mail-Format</span></td><td nowrap><? if(isset($_POST["1167776393718_emailformatField_errorimg"])) echo stripslashes($_POST["1167776393718_emailformatField_errorimg"]); ?></td><td><select name='emailformatField[]' size='0' class=''><option selected value='HtmlEmbeddImg' label='HTML (eingebettete Bilder)'>HTML (eingebettete Bilder)</option><option value='HtmlLinkImg' label='HTML (Verknüpfung zu Bildern).'>HTML (Verknüpfung zu Bildern).</option><option value='Text' label='Reiner Text'>Reiner Text</option><option value='URL' label='URL'>URL</option></select></td></tr><tr><td></td><td nowrap><? if(isset($_POST["1167776393718_Senden_errorimg"])) echo stripslashes($_POST["1167776393718_Senden_errorimg"]); ?></td><td><input size='0' value='Senden' class='' name='Senden' maxlength='0' type='SUBMIT'></td></tr><tr><td colspan='3'><? if(isset($_POST["1167776393718_errormessgs"])) echo stripslashes($_POST["1167776393718_errormessgs"]); ?></td></tr></table></form>
<?
$nof_componentId = "1167776393718";
if (NOF_fileExists("../scripts/ep_remembervalues.php")) include("../scripts/ep_remembervalues.php");
}
?>
</td>
  </tr>
 </table>
</body>
</html>
Und hier die anschließende Erfolgsmeldung in html-fenster:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>
<title>erfolg</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="Generator" content="NetObjects Fusion 9 for Windows">
<link rel="stylesheet" type="text/css" href="../html/style.css">
<link rel="stylesheet" type="text/css" href="../html/site.css">
<script language="JavaScript">
//  Based on script by the amazing [email]taz@blastradius.com[/email] 

windowWidth=500;
windowHeight=500;
if (parseInt(navigator.appVersion) >= 4) window.moveTo((screen.width/2)-(windowWidth/2+10),(screen.height/2)-(windowHeight/2+20));

 

</script>
</head>

<body style="margin: 0px;">

 <table border="0" cellspacing="0" cellpadding="0" width="469">

  <tr valign="top" align="left">

   <td width="56" height="209"><img src="../assets/images/autogen/clearpixel.gif" width="56" height="1" border="0" alt=""></td>

   <td width="413"><img src="../assets/images/autogen/clearpixel.gif" width="413" height="1" border="0" alt=""></td>

  </tr>

  <tr valign="top" align="left">

   <td></td>

   <td width="413" class="TextObject">

    <p><span style="font-family: 'Gill Sans MT Ext Condensed Bold', sans-serif; font-size: 36px;">ERFOLGREICH VERSENDET!</span></p>

   </td>

  </tr>

 </table>

</body>

</html>
Ich hoffe nun kann man etwas erkennen

danke für die Antwort
 
Zuletzt bearbeitet von einem Moderator:
Zurück
Oben