Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [JavaScript][HTML][CSS]Nieklikalny input type submit
furman12
post 26.04.2010, 13:32:08
Post #1





Grupa: Zarejestrowani
Postów: 118
Pomógł: 4
Dołączył: 3.12.2009

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


Witam,
wygenerowałem sobie szablon html programem artisteer 2, zechciałem użyć kilku formularzy i przy tym pojawił się problem. Gdy mam 1 submit wszystko gra, ale gdy dodam drugi tylko ten pierwszy działa.
Kod
  1. 1. <input class="art-button" name="login" type="submit" src="java script:void(0)" value="Zaloguj" />
  2. 2. <input class="art-button" name="send" type="submit" src="java script:void(0)" value="Wyślij" />


Ktoś miał z tym problem?

PS: bez klasy submit działa dobrze.
Go to the top of the page
+Quote Post
blooregard
post 26.04.2010, 13:39:04
Post #2


Newsman


Grupa: Moderatorzy
Postów: 2 033
Pomógł: 290
Dołączył: 21.12.2007
Skąd: Łódź




Zamień jednego na type="button" i przypisz mu akcję w JavaScript.


--------------------
Life's simple... You make choices and don't look back...
Go to the top of the page
+Quote Post
furman12
post 26.04.2010, 14:00:02
Post #3





Grupa: Zarejestrowani
Postów: 118
Pomógł: 4
Dołączył: 3.12.2009

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


Teraz zauważyłem, że submit zaczyna działać po usunięciu zaznacznika <table>. O co chodzi?!

@blooregard
Za raz sprawdzę co mówisz.
Go to the top of the page
+Quote Post
cros
post 26.04.2010, 15:28:25
Post #4





Grupa: Zarejestrowani
Postów: 164
Pomógł: 21
Dołączył: 21.08.2009

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


Cytat(furman12 @ 26.04.2010, 15:00:02 ) *
Teraz zauważyłem, że submit zaczyna działać po usunięciu zaznacznika <table>. O co chodzi?!

Bo w jednej formie nie mozesz miec dwoch SUBMITow.
Go to the top of the page
+Quote Post
furman12
post 26.04.2010, 18:44:19
Post #5





Grupa: Zarejestrowani
Postów: 118
Pomógł: 4
Dołączył: 3.12.2009

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


Chyba mnie źle zrozumiałeś. Chodziło o to.
Nie działa:
  1. <form method="POST">
  2. <input type="text">
  3. <input class="art-button" name="send" type="submit" src="java script:void(0)" value="Wyślij" />


Działa
  1. <form method="POST">
  2. <input type="text">
  3. <input class="art-button" name="send" type="submit" src="java script:void(0)" value="Wyślij" />


Dlaczego tak się dzieje?

Ten post edytował furman12 26.04.2010, 18:45:00
Go to the top of the page
+Quote Post
cros
post 26.04.2010, 18:47:11
Post #6





Grupa: Zarejestrowani
Postów: 164
Pomógł: 21
Dołączył: 21.08.2009

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


a zamknij tag </form>
Go to the top of the page
+Quote Post
furman12
post 27.04.2010, 15:37:19
Post #7





Grupa: Zarejestrowani
Postów: 118
Pomógł: 4
Dołączył: 3.12.2009

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


W orginale jest zamknięty... I nie działa.

Czy to jakiś nie znany przypadek?
Go to the top of the page
+Quote Post
varez
post 27.04.2010, 16:02:57
Post #8





Grupa: Zarejestrowani
Postów: 275
Pomógł: 32
Dołączył: 17.06.2007

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


a wylacz javascript (tj u siebie w przegladarce) i zobacz co sie stanie
Go to the top of the page
+Quote Post
krzysztof_kf
post 27.04.2010, 16:18:36
Post #9





Grupa: Zarejestrowani
Postów: 1 135
Pomógł: 158
Dołączył: 19.03.2009
Skąd: Toruń

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


A spróbuj tak

  1. <form method="POST">
  2. <td><input type="text"></td>
  3. <td><input class="art-button" name="send" type="submit" src="java script:void(0)" value="Wyślij" /></td>
  4.  


Ten post edytował krzysztof_kf 27.04.2010, 16:18:52
Go to the top of the page
+Quote Post
furman12
post 27.04.2010, 16:24:53
Post #10





Grupa: Zarejestrowani
Postów: 118
Pomógł: 4
Dołączył: 3.12.2009

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


To nic nie daje. Bez js nie ma efektów wyglądu więc to mnie nie zadowala.
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 08:50