![]() |
SELFHTML Forumsarchiv |
|
|
Die folgende Nachricht zum Thema stammt von: wurm, 31. 03. 2003, 16:13
.. hallo möchte in folgende if anweisung:
if ($ad_1_text)
{
print("<tr>");
print("<td width=\"50%\" valign=\"top\"> $ad_1_text </td>");
print("<td width=\"50%\" valign=\"top\">");
print("<input type='Dropdown' name=\"custom_field_1\" size=\"29\" class='txt' value=\"$custom_field_1\" />");
print("</td>");
print("</tr>");
}
ein Pulldown Menu zur Auswahl einfügen ... bekomm es aber irgendwie nicht hin kann mir jemand helfen???????
Die folgende Nachricht zum Thema stammt von: Philipp Grashoff, 31. 03. 2003, 16:17
Hi Wurm,
»» print("<input type='Dropdown' name=\"custom_field_1\" size=\"29\"
Hier liegt der Fehler begraben... es gibt kein input type="dropdown"
Ein Dropdown-Menue erhaelst du, wenn du ein select mit size="1" erstellst.
MFG
Philipp
Die folgende Nachricht zum Thema stammt von: wurm, 31. 03. 2003, 16:20
´Hy Philipp
wie soll ich einen select erstellen? input type=select ??
Die folgende Nachricht zum Thema stammt von: Philip, 31. 03. 2003, 16:32
»» wie soll ich einen select erstellen? input type=select ??
so:
<form method="POST" action="file.php">
<select size="1" name="custom_field_1">
<option value="value1">Dies ist</option>
<option value="value2">ein</option>
<option value="value3">Pulldownmenue</option>
</select>
<input type="submit" value="Abschicken">
</form>
Philip
Die folgende Nachricht zum Thema stammt von: wurm, 31. 03. 2003, 16:40
... also so weit ist es mir ja klar ich weiß nur nicht wie ich das in die if schleife einbauen soll .. hab es jetztnso prob. .. funkt. so aber natürlich nich!
if ($ad_1_text)
{
print("<form method="POST" action="search.php">");
print("<select size="1" name="custom_field_1">");
print("<option value="value1">Dies ist</option>");
Die folgende Nachricht zum Thema stammt von: wurm, 31. 03. 2003, 16:42
... ach so brauche keinen submit button weil ich noch mehrere if anweisungen habe
Die folgende Nachricht zum Thema stammt von: wurm, 31. 03. 2003, 18:05
... hy also so weit funktioniert es jetzt nur übergibt er das suchwort nicht richtig oder gar nicht dem script! .. was kann das jetzt noch sein?
print("<tr>");
print("<td width=\"50%\" valign=\"top\"> $ad_1_text </td>");
print("<td width=\"50%\" valign=\"top\">");
print('<form method="POST" action="search.php">');
print('<select size="1" name="custom_field_1\">');
print('<option value="custom_field_1\">New</option>');
print('<option value="custom_field_1\"><1 Month</option>');
print('<option value="custom_field_1\">2-6 Months</option>');
print('<option value="custom_field_1\">6-12 Months</option>');
print('<option value="custom_field_1\"><1 Year</option>');
print('<option value="custom_field_1\"><2 Years</option>');
print('<option value="custom_field_1\"><3 Years</option>');
print('<option value="custom_field_1\"><4 Years</option>');
print('<option value="custom_field_1\"><5 Years</option>');
print('<option value="custom_field_1\">over 5 Years</option>');
print('</select>');
print('<value=\"$custom_field_1\" />');
print("</td>");
print("</tr>");
Die folgende Nachricht zum Thema stammt von: Philip, 31. 03. 2003, 16:58
»» ... also so weit ist es mir ja klar ich weiß nur nicht wie ich das in die if schleife einbauen soll .. hab es jetztnso prob. .. funkt. so aber natürlich nich!
»» if ($ad_1_text)
»» {
»» print("<form method="POST" action="search.php">");
»» print("<select size="1" name="custom_field_1">");
»» print("<option value="value1">Dies ist</option>");
Das ist klar, dass es da einen Fehler gibt:
Entweder machst du es so:
print('<form method="POST" action="search.php">');
print('<select size="1" name="custom_field_1">');
print('<option value="value1">Dies ist</option>');
oder so:
print("<form method=\"POST\" action=\"search.php\">");
print("<select size=\"1\" name=\"custom_field_1\">");
print("<option value=\"value1\">Dies ist</option>");
Du musst die Anführungszeichen maskieren (letztes Beispiel) oder durch einfache Anführungszeichen ersetzen.
Philip
© 1998-2006
Impressum, Software: Classic Forum