Autor Beitrag
hibbert
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Fr 09.01.04 18:07 
Hi,
ich habe eine normale php Seite.
Auf dieser Seite ist ein Iframe (name frame1)
Unter diesem Iframe habe ich ein Formular.
Wenn ich nun auf den Butten des Formulars klicke, werden die eingegebenen Daten an eine andere Seite geschickt, welche dann im Iframe geladen wird.

Nun zum Problem:
Das Formular enthält noch die Variabeln, die der User eingebenen hat, bzw. verändert hat.

Wie kann ich jetzt das Formulat zurücksetzen, ohne die Seite (die mit dem Iframe) neu laden zu müssen.

Das müsste doch mit JS gehen, oder?

thx hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
ixtreme
Gast
Erhaltene Danke: 1



BeitragVerfasst: Fr 09.01.04 21:02 
Vielleicht es es ja das was du suchst:

ausblenden Quelltext
1:
javascript:document.Testform.reset()					



oder auch so:

ausblenden Quelltext
1:
2:
3:
<script language=JavaScript>
document.Testform.reset();
</script>


Gruß

ixtreme.de
hibbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Fr 09.01.04 23:00 
jo, das habe ich auch schon benutzt, doch die daten sollen ja gleichzeitig noch übertragen werden.
lautet der Quelltext dann so?
ausblenden Quelltext
1:
2:
form1.testform.submit();
form1.testform.reset();


weil ich bin der meinung das das nicht gefunzt hat.

vielleicht gibt es ja noch ne andere möglichkeit
thx hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Mo 12.01.04 09:09 
einfach nen button machen:
ausblenden Quelltext
1:
<input type=reset value=Zurücksetzen>					

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
hibbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Mo 12.01.04 15:27 
aber dann werden die daten doch nicht mehr gesendet, oder?

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
StefanH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: Mo 12.01.04 16:35 
hibbert hat folgendes geschrieben:
ausblenden Quelltext
1:
2:
form1.testform.submit();
form1.testform.reset();



:shock: :o this is JS, no Delphi :)

ausblenden Quelltext
1:
2:
docum.testform.submit();
document.testform.reset();


sollte funzen :roll:

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Mo 12.01.04 17:50 
hibbert hat folgendes geschrieben:
aber dann werden die daten doch nicht mehr gesendet, oder?

ne is ja logisch...
ist doch sinnlos, senden und dann reset *gg*

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
hibbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Mo 12.01.04 18:11 
wieso sinnlos?
Ich habe eine PHP-Seite mit einem Iframe.
Das Formular befindet sich auf der PHP-Seite.
Wir nun der Submitbutton angeklickt, werden die eingegebenen Daten an eine Seite im Iframe übermittelt.
Und nur der Iframe wird neu geladen, der rest nicht.

Da es sich bei mir um einen PHP Chat handelt, soll sich nur das Chat Window aktualisieren und der Inhalt der Form (also des Formulars) soll wieder gelöscht werden, da ich nicht möchte, dass die ganze Seite wieder neu geladen werden soll.

Nun macht das ganze doch sinn, oder ? :wink:

hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Mo 12.01.04 18:28 
Asou... jop so machts sinn!

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
hibbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Di 13.01.04 17:16 
Hi, ich habe das ganze jetzt so gelöst:
ausblenden Quelltext
1:
2:
3:
4:
function senden() {
document.form.submit();
document.form.reset();
}

und dann per buttonklick diese funktion aufrufen.

MfG hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej