submit in popup mit textlink funktioniert nicht

-Ener-

Erfahrenes Mitglied
Also im folgenden script ist ganz unten ein submit-link kein Button...mit Button öffnet sich der submit in einem popup aber mit textlink leider nicht =( kann mir wer helfen?


PHP:
<?php
echo "<script language=JavaScript>
function add() {
	document.adddl.submit();
 
}
</script>
<CENTER><span style=font-family:Verdana;font-size:9.5pt;font-color:black><b>Download eintragen</b></span></CENTER><br><form name=adddl action=\"".$cfg["URL"]."/\" target=\"popup\" method=\"post\" onSubmit=\"window.open('', 'popup', 'width=300, height=300');\">\n<input type=hidden name=\"site\" value=\"save\">\n<input type=hidden ";
echo "name=\"uip1\" value=\"".$_ENV["REMOTE_ADDR"]."\">\n<table align=left border=0 cellspacing=0 cellpadding=2><tr><td><span style=font-family:Verdana;font-size:8pt;font-color:black><b>Interpret und Titel:</b></td>";
echo "<td><input type=text ";
echo "name=\"titel\" style=\"height:20px;width:200px;background:ffffff;border:1px;border-style:dashed;\" onmousedown=\"style.backgroundColor='F3F9FE';\" onmouseover=\"style.backgroundColor='F3F9FE';\" onmouseout=\"style.backgroundColor='ffffff';\"></td></tr>\n";
echo "<tr><td><span style=font-family:Verdana;font-size:8pt;font-color:black><b>Download-URL:</b></td><td><input type=text name=\"url\" style=height:20px;width:230px;background:ffffff;border:1px;border-style:dashed onmousedown=\"style.backgroundColor='F3F9FE';\" onmouseover=\"style.backgroundColor='F3F9FE';\" onmouseout=\"style.backgroundColor='ffffff';\"></td></tr>\n";
echo "<tr><td valign=top><span style=font-family:Verdana;font-size:8pt;font-color:black><b>Beschreibung:</b></td>";
echo "<td><textarea name=\"beschreibung\" rows=6 cols=36 style=background:ffffff;border:1px;border-style:dashed;overflow:auto onmousedown=\"style.backgroundColor='F3F9FE';\" onmouseover=\"style.backgroundColor='F3F9FE';\" onmouseout=\"style.backgroundColor='ffffff';\"></textarea>";
echo "</td></tr>\n<tr><td><span style=font-family:Verdana;font-size:8pt;font-color:black><b>Kategorie:</b></td><td><select name=cat class=select size=1 onmousedown=\"style.backgroundColor='F3F9FE';\" onmouseup=\"style.backgroundColor='ffffff';\" onmouseoutr=\"style.backgroundColor='ffffff';\" >";
$in_kat=mysql_query("SELECT * FROM ja_".$sql_kat_ll." ORDER BY KatTitel") or die("Abfrage der Kategorien nicht m&ouml;glich!<br>".mysql_error());
while($kat=mysql_fetch_array($in_kat)) {
echo "<option value=\"".$kat["catid"]."\"";
if ($kat["catid"] == $HTTP_GET_VARS["cat"]) echo " selected";
echo ">".$kat["KatTitel"]."</option>";
}
echo "</td></tr>";
if ($cfg["f1_sta"]=="Y") echo "<tr><td valign=top>".$cfg["f1_tit"].":</td><td><input type=text name=\"f1_val\" size=40></td></tr>\n";
if ($cfg["f2_sta"]=="Y") echo "<tr><td valign=top>".$cfg["f2_tit"].":</td><td><input type=text name=\"f2_val\" size=40></td></tr>\n";
if ($cfg["f3_sta"]=="Y") echo "<tr><td valign=top>".$cfg["f3_tit"].":</td><td><input type=text name=\"f3_val\" size=40></td></tr>\n";
if ($cfg["f4_sta"]=="Y") { echo "<tr><td valign=top>".$cfg["f4_tit"].":</td><td><textarea name=\"f4_val\" rows=6 cols=36></textarea>";
echo "<br><span class=note>Max. <b>".$cfg["MaxEntry"]." Zeichen</b>!</span></td></tr>\n"; }
echo "<tr><td><span style=font-family:Verdana;font-size:8pt;font-color:black><b>Passwort:</b></span></td><td><input type=password name=\"pass1\" style=height:20px;width:100px;background:ffffff;border:1px;border-style:dashed onmousedown=\"style.backgroundColor='F3F9FE';\" onmouseover=\"style.backgroundColor='F3F9FE';\" onmouseout=\"style.backgroundColor='ffffff';\">";
echo "";
echo "</td></tr>\n<tr><td><span style=font-family:Verdana;font-size:8pt;font-color:black><b>Passwort Wiederholung:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></span></td><td><input type=password name=\"pass2\" style=height:20px;width:100px;background:ffffff;border:1px;border-style:dashed onmousedown=\"style.backgroundColor='F3F9FE';\" onmouseover=\"style.backgroundColor='F3F9FE';\" onmouseout=\"style.backgroundColor='ffffff';\">";
echo "</td></tr><tr><td><span style=font-family:Verdana;font-size:8pt;font-color:black><b>Name:</b></span></td><td><input type=text ";
echo "name=\"kname\" style=height:20px;width:180px;background:ffffff;border:1px;border-style:dashed onmousedown=\"style.backgroundColor='F3F9FE';\" onmouseover=\"style.backgroundColor='F3F9FE';\" onmouseout=\"style.backgroundColor='ffffff';\"></td></tr>\n<tr><td><span style=font-family:Verdana;font-size:8pt;font-color:black><b>Email:</b></span></td><td><input type=text name=\"kemail\" style=height:20px;width:230px;background:ffffff;border:1px;border-style:dashed onmousedown=\"style.backgroundColor='F3F9FE';\" onmouseover=\"style.backgroundColor='F3F9FE';\" onmouseout=\"style.backgroundColor='ffffff';\"></td>";
echo "</tr>\n<tr><td colspan=2 align=center>
<a href=javascript:add() onmouseover= status='Downloadsuche';return true; ><span style= font-family:verdana;font-size:7.5pt ><b>suchen</b></span></a>
 
</td></tr>\n</table><br>";
?>
 
"onsubmit" feuert nicht, wenn du ein Formular mit der "submit()"-Methode sendest.
Packe den Teil, der das Popup öffnet, in die Funktion add() ....dann sollte es gehen.
 
Einfach
PHP:
onSubmit=\"window.open('', 'popup', 'width=300, height=300');\">
in
PHP:
<?php
echo "<script language=JavaScript>
function add() {
	document.adddl.submit();
 
}
</script>
einfügen oder anders?
 
Jo...aber ohne das "onsubmit":
Code:
<?php
<script type="text/javascript">
<!--
function add() {
    window.open('', 'popup', 'width=300, height=300');
    document.adddl.submit();

}
//-->
</script>
 
Zuletzt bearbeitet:

Neue Beiträge

Zurück