Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Form
kicaj
post
Post #1





Grupa: Zarejestrowani
Postów: 1 640
Pomógł: 28
Dołączył: 13.02.2003
Skąd: Międzyrzecz/Poznań

Ostrzeżenie: (0%)
-----


Kod
<iframe src="shoutbox.php" name="shoutbox" frameborder="0" width="165" height="200"></iframe>

<form method="post" action="shoutbox.php" target="shoutbox">

<input type="text" name="shout"><br>

<input type="image" src="img/<? echo $styl; ?>/przycisk_ok.gif" name="nshout" style="border: 0"><br>

[ <a href="shoutbox.php" target="shoutbox">od&para;wież</a> ]

</form>


Ten formularz przesyla wartosc do ramki...
Ale w polu "shout" zostaje ta wartosc! Jak zrobic zeby po wyslaniu czyscilo formularz...
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 17)
spenalzo
post
Post #2





Grupa: Zarejestrowani
Postów: 2 064
Pomógł: 1
Dołączył: 22.01.2003
Skąd: Poznań

Ostrzeżenie: (0%)
-----


Może ustaw value=""?
Nie za bardzo rozumiem, o co chodzi..
Go to the top of the page
+Quote Post
kicaj
post
Post #3





Grupa: Zarejestrowani
Postów: 1 640
Pomógł: 28
Dołączył: 13.02.2003
Skąd: Międzyrzecz/Poznań

Ostrzeżenie: (0%)
-----


tak probowalem...

Chodzi o to ze wartosc pola "shout" jest przesyalana do ramki, ale wartosc w polu zostaje po wslaniu a formularz powinnien sie czyscic, ale nie wiem jak to zrobic
Go to the top of the page
+Quote Post
HaRy
post
Post #4





Grupa: Zarejestrowani
Postów: 152
Pomógł: 0
Dołączył: 15.05.2002
Skąd: Łódź

Ostrzeżenie: (0%)
-----


to juz javascript
Kod
<script>

function send(form) {

  form.pole.value="";

  form.submit();

}

</script>

a w formularzu:
Kod
<form onSubmit="send(this)">

<input type="text" name="pole">
Go to the top of the page
+Quote Post
spenalzo
post
Post #5





Grupa: Zarejestrowani
Postów: 2 064
Pomógł: 1
Dołączył: 22.01.2003
Skąd: Poznań

Ostrzeżenie: (0%)
-----


A nie odwrotnie? Bo teraz najpierw czyścisz a potem wysyłasz.
Go to the top of the page
+Quote Post
kicaj
post
Post #6





Grupa: Zarejestrowani
Postów: 1 640
Pomógł: 28
Dołączył: 13.02.2003
Skąd: Międzyrzecz/Poznań

Ostrzeżenie: (0%)
-----


umieszczalem ten kod przed, po, w srodku i przesyla pusty $shout do ramki...

Umiesc go tam gdzie ma byc, wyglad formularza masz powyzej...

THX
Go to the top of the page
+Quote Post
HaRy
post
Post #7





Grupa: Zarejestrowani
Postów: 152
Pomógł: 0
Dołączył: 15.05.2002
Skąd: Łódź

Ostrzeżenie: (0%)
-----


do mnie to piszesz?
Go to the top of the page
+Quote Post
HaRy
post
Post #8





Grupa: Zarejestrowani
Postów: 152
Pomógł: 0
Dołączył: 15.05.2002
Skąd: Łódź

Ostrzeżenie: (0%)
-----


Cytat
A nie odwrotnie? Bo teraz najpierw czyścisz a potem wysyłasz.


fakt (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)

pomyleczka sorki.
Go to the top of the page
+Quote Post
kicaj
post
Post #9





Grupa: Zarejestrowani
Postów: 1 640
Pomógł: 28
Dołączył: 13.02.2003
Skąd: Międzyrzecz/Poznań

Ostrzeżenie: (0%)
-----


no wiesz jak to mniejwiecej poustawiac, bo przesyla mi pusty $shout...
Go to the top of the page
+Quote Post
HaRy
post
Post #10





Grupa: Zarejestrowani
Postów: 152
Pomógł: 0
Dołączył: 15.05.2002
Skąd: Łódź

Ostrzeżenie: (0%)
-----


Kod
<script>

function send(form) {

    form.submit();

    form.pole.value="";

}

</script>


zamienic kolejnoscia jak spenalzo trafnie zauwazyl (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

[/b]
Go to the top of the page
+Quote Post
Seth
post
Post #11





Grupa: Przyjaciele php.pl
Postów: 2 335
Pomógł: 6
Dołączył: 7.03.2002

Ostrzeżenie: (0%)
-----


php Poczatkujacy >> Hydepark
Go to the top of the page
+Quote Post
spenalzo
post
Post #12





Grupa: Zarejestrowani
Postów: 2 064
Pomógł: 1
Dołączył: 22.01.2003
Skąd: Poznań

Ostrzeżenie: (0%)
-----


Hmm, zamień 'pole' na nazwę pola czyli 'shout'
(IMG:http://spenalzo.republika.pl/e/co_jest.gif)
Go to the top of the page
+Quote Post
HaRy
post
Post #13





Grupa: Zarejestrowani
Postów: 152
Pomógł: 0
Dołączył: 15.05.2002
Skąd: Łódź

Ostrzeżenie: (0%)
-----


no to chyba juz jest jasne ...

choc ... moze i nie ...
Go to the top of the page
+Quote Post
kicaj
post
Post #14





Grupa: Zarejestrowani
Postów: 1 640
Pomógł: 28
Dołączył: 13.02.2003
Skąd: Międzyrzecz/Poznań

Ostrzeżenie: (0%)
-----


nie skapowialem z kolejnoscia...

myslalem gdzie ustawic ten <script> czy przed, czy w, czy za formularzem... (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
heheh
thx
Go to the top of the page
+Quote Post
kicaj
post
Post #15





Grupa: Zarejestrowani
Postów: 1 640
Pomógł: 28
Dołączył: 13.02.2003
Skąd: Międzyrzecz/Poznań

Ostrzeżenie: (0%)
-----


Kod
<script>

function send(form) {

form.submit();

form.shout.value="";

}

</script>



<iframe src="shoutbox.php" name="shoutbox" frameborder="0" width="165" height="200"></iframe>

<form method="post" action="shoutbox.php" target="shoutbox" onSubmit="send(this)">

<input type="text" name="shout"><br>

<input type="image" src="img/<? echo $styl; ?>/przycisk_ok.gif" name="nshout" style="border: 0"><br>

[ <a href="shoutbox.php" target="shoutbox">od&para;wież</a> ]

</form>
dalej przesyla pusty $shout...
Go to the top of the page
+Quote Post
HaRy
post
Post #16





Grupa: Zarejestrowani
Postów: 152
Pomógł: 0
Dołączył: 15.05.2002
Skąd: Łódź

Ostrzeżenie: (0%)
-----


ku potomnosci:

Kod
<script>

function send(form) {

form.submit();  

form.shout.value=form.shout_tmp.value;

form.shout_tmp.value = "";

  return true

  }

  </script>

  

  <iframe src="shoutbox.php" name="shoutbox" frameborder="0" width="165" height="200"></iframe>

  <form method="post" action="shoutbox.php" target="shoutbox" onSubmit="return send(this)">

  <input type="text" name="shout_tmp"><br>

  <input type="hidden" name="shout" value="">

  <input type="image" src="img//przycisk_ok.gif" name="nshout" style="border: 0"><br>

  [ <a href="shoutbox.php" target="shoutbox">od&para;wież</a> ]

  </form>
Go to the top of the page
+Quote Post
kicaj
post
Post #17





Grupa: Zarejestrowani
Postów: 1 640
Pomógł: 28
Dołączył: 13.02.2003
Skąd: Międzyrzecz/Poznań

Ostrzeżenie: (0%)
-----


noo dziala nareszcie

wielkie thx (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
HaRy
post
Post #18





Grupa: Zarejestrowani
Postów: 152
Pomógł: 0
Dołączył: 15.05.2002
Skąd: Łódź

Ostrzeżenie: (0%)
-----


(IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 06:59