Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 15-11-2005, 16:08   #1 (permalink)
°
 
Benutzerbild von echo5-7
 
Registriert seit: Aug 2002
Ort: Baden-Baden
Beiträge: 3.962
[FLASH MX] problem mit mailformular abfrage

hi,
das ist das script.
textfelder sind auch alle richtig benannt, ich weiß einfach net weiter.
problem ist, dass die abfrage am ende, ob alle felder ausgefüllt sind, nicht funktioniert. er traced mir in jedem fall, das die comments ok sind, auch wenn diese leer sind.

Code:
txt_name.text = " ";
txt_email.text = " ";
txt_comments.text = " ";
	trace("--"+txt_name.text+"--");
	trace("--"+txt_email.text+"--");
	trace("--"+txt_comments.text+"--");
txt_name.onSetFocus = function() {
	if (this.text == "" || this.text == " ") {
		trace("kein text vorhanden");
		txt_name.text = " ";
	}
};
txt_email.onSetFocus = function() {
	if (this.text == "" || this.text == " ") {
		trace("kein text vorhanden");
		txt_email.text = " ";
	}
};
txt_comments.onSetFocus = function() {
	if (this.text == "" || this.text == " ") {
		trace("kein text vorhanden");
		txt_comments.text = "";
	}
};
txt_name.onKillFocus = function() {
	if (this.text == "" || this.text == " ") {
		trace("kein text vorhanden");
		this.text = " ";
	}
};
txt_email.onKillFocus = function() {
	if (this.text == "" || this.text == " ") {
		trace("kein text vorhanden");
		this.text = " ";
	}
};
txt_comments.onKillFocus = function() {
	if (this.text == " " || this.text == " ") {
		trace("comments kein text vorhanden");
		this.text = " ";
	}
};
empfang = new LoadVars();
empfang.onLoad = function() {
	txt_comments.text = "Thanks for emailing us.";
	trace("empfang");
};
bttn_send.onRelease = function() {
	emailtext = txt_email.text;
	if (this._parent.txt_comments.text !== " " || this._parent.txt_comments.text !== "") {
		trace("comments ok ");
		if ((txt_email.text != "" || txt_email.text != " ") && (emailtext.indexOf("@") != (-1) && emailtext.indexOf(".") != (-1))) {
			trace("email ok");
			if (txt_name.text != "" || txt_name.text != " ") {
				trace("name ok");
				meinlader = new LoadVars();
				meinlader.oname = txt_name.text;
				meinlader.oemail = txt_email.text;
				meinlader.omessage = txt_comments.text;
				meinlader.sendAndLoad("confirm.php", empfang, "POST");
			}
		}
	}
};
__________________

LRRM | BLOG | FACEBOOK | TWITTER | G+
echo5-7 ist offline   Mit Zitat antworten
Alt 15-11-2005, 16:16   #2 (permalink)
°
 
Benutzerbild von echo5-7
 
Registriert seit: Aug 2002
Ort: Baden-Baden
Beiträge: 3.962
!== is eine abfrage nach dem typ. is schon richtig, wenn der typ was anderes als string wäre, dann würde es nicht gehen. funktioniert aber auch mit nur != nicht.
__________________

LRRM | BLOG | FACEBOOK | TWITTER | G+

Geändert von echo5-7 (15-11-2005 um 16:22 Uhr)
echo5-7 ist offline   Mit Zitat antworten
Alt 15-11-2005, 16:38   #3 (permalink)
................
 
Benutzerbild von Der Frager
 
Registriert seit: Jun 2004
Beiträge: 15.890
Eine der Abfragen ist doch immer erfüllt, oder?
PHP-Code:
if (this._parent.txt_comments.text !== " " && this._parent.txt_comments.text !== ""
edit: Sorry für das erste Posting. War ja Blödsinn
__________________

ternärer Konditionaloperator

+++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++
Der Frager ist offline   Mit Zitat antworten
Alt 15-11-2005, 16:43   #4 (permalink)
°
 
Benutzerbild von echo5-7
 
Registriert seit: Aug 2002
Ort: Baden-Baden
Beiträge: 3.962
volltreffer!
irgendwie brauch ich mal eine Der Frager flatrate
danke dir
__________________

LRRM | BLOG | FACEBOOK | TWITTER | G+
echo5-7 ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

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

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



Alle Zeitangaben in WEZ +1. Es ist jetzt 10:25 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele