Eurokicker
-


Hinweise


Antwort
 
LinkBack Themen-Optionen Thema durchsuchen Thema bewerten
Alt 13.12.2004, 09:50   #1
TP-Insider
 
Benutzerbild von tribun
 
Registriert seit: Jun 2003
Ort: Beckingen, Saarland
tribun ist auf einem guten Weg

[erledigt] JavaScript und Select-Feld: Variable leer


Hi,

ich habe ein Formular, das ein <select>-Feld enthält:

Code:
<select name="txtColorVorne" onChange="javascript:zeile1()">
  <option value="#000000">schwarz</option>
  <option value="#ffffff">weiss</option>
</select>
Im JS-Code will ich nun den Value-Wert auslesen:
Code:
var txtColorV 	= document.konfigurator.txtColorVorne.options.value;
und an eine URL dranhängen:
Code:
document.BSchrift_vorne.src="./maketext.php?textZ1v="+textZ1v+"&txtColorV="+txtColorV;
Allerdingt ist die Variable immer leer, der Link sieht so aus:

maketext.php?textZ1v=fgdhd&txtColorV=undefined

Jemand ne Idee, warum? Stimmt was bei "document.konfigurator.txtColorVorne.options.value" nicht
("konfigurator" ist der Formularname, "txtColorVorne" ist der Name des Select-Feldes)?

Gruß
Tribun
__________________
if (!isset($plan)) {
$antwort1 = forum_suche($frage);
$antwort2 = google_suche($frage);
if ($antwort1 == "" && $antwort2 == "") {
$post = forum($frage);
$plan = $post;
}
}
array_push($community, $plan);

Geändert von tribun (24.12.2004 um 14:25 Uhr).
tribun ist offline   Mit Zitat antworten


Alt 13.12.2004, 10:28   #2
TP-Special Mod
 
Benutzerbild von webmichl
 
Registriert seit: Jun 2001
Ort: 8°21' O 49°1' N
webmichl lebt für das TP und seine Userwebmichl lebt für das TP und seine Userwebmichl lebt für das TP und seine Userwebmichl lebt für das TP und seine Userwebmichl lebt für das TP und seine Userwebmichl lebt für das TP und seine Userwebmichl lebt für das TP und seine Userwebmichl lebt für das TP und seine User
Versuchs mal mit:

Code:
    var txtColorV 	= document.konfigurator.txtColorVorne.options[selectedIndex].value;
Info zu options
webmichl ist offline   Mit Zitat antworten
Alt 13.12.2004, 19:15   #3
TP-Insider
 
Benutzerbild von tribun
 
Registriert seit: Jun 2003
Ort: Beckingen, Saarland
tribun ist auf einem guten Weg
So gings:
Code:
function CheckAuswahl() {
 for(i=0;i<document.Testform.Auswahl.length;++i)
  if(document.Testform.Auswahl.options[i].selected == true)
   alert(document.Testform.Auswahl.options[i].value);
}
Danke!
__________________
if (!isset($plan)) {
$antwort1 = forum_suche($frage);
$antwort2 = google_suche($frage);
if ($antwort1 == "" && $antwort2 == "") {
$post = forum($frage);
$plan = $post;
}
}
array_push($community, $plan);
tribun ist offline   Mit Zitat antworten
Antwort

  Aktuelles Thema
  TP Hilfe Forum > Web-Editoren & Coding > Traum-Dynamik
JavaScript und Select-Feld: Variable leer JavaScript und Select-Feld: Variable leer
« Daten aus Abfrage-Resultat exportieren | [MySQL] 2 selects in ein array tun »

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Gewerbe brauche hilfe basti2004 Gründung & Selbstständigkeit 24 08.08.2004 22:49
Selbstständigkeit unter 18 Bitte erst lesen ! Epic Gründung & Selbstständigkeit 0 08.08.2004 21:49
Variable und feste Spaltenbreiten kombiniert bei variabler Gesamtbreite seb HTML Puristen 4 20.10.2002 21:29


Alle Zeitangaben in WEZ +2. Es ist jetzt 01:24 Uhr.

Powered by: vBulletin Version 3.7 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. / Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Traum-Projekt.com | Suchen | Archiv | Impressum | Kontakt | | | Nach oben |



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67