Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [html] jak poprawnie umiescic formularz w tabeli ?
Sir_Yaro
post 20.11.2007, 13:00:45
Post #1





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 3.01.2004

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


Witam.
Jestem bardzo poczatkujacy wiec bardzo prosze o pomoc bo nie potrafie tego rozwiazac sam.
php generuje mi kod jak ponizej. Jak sie doczytalem jest zly gdyz nie mozna zagniezdzac formularzy w tabelach. Fakt ze sie to wyswietla inaczej w kazdej przegladarce zdecydowanie to potwierdza. sadsmiley02.gif
Niestety nie potrafie tego poprawic a kilka opisow traktujacych w tym temacie nie rozumiem zbyt dobrze.
Czy potrafilby mi ktos poprawic ten kod tak aby byl poprawny?

Jesli dało by sie takze umiescic te przyciski obok siebie a nie pod soba bylbym dozgonnie wdzieczny....

  1. <table style="text-align: left; width: 100%;" border="1"
  2. cellpadding="0" cellspacing="0">
  3. <tr>
  4. <td style="text-align: center; background-color: rgb(204, 204, 255); width: 30px;">lp</td>
  5. <td style="text-align: center; background-color: rgb(204, 204, 255); width: 125px;">Montażysta</td>
  6. <td style="text-align: center; background-color: rgb(204, 204, 255); width: 125px;">MAC</td>
  7. <td style="text-align: center; background-color: rgb(204, 204, 255); width: 287px;">Adres</td>
  8. <td style="text-align: center; background-color: rgb(204, 204, 255); width: 287px;">Uwagi</td>
  9. <td style="text-align: center; background-color: rgb(204, 204, 255); width: 140px;">Data zlecenia</td>
  10. <td style="text-align: center; background-color: rgb(204, 204, 255); width: 140px;">Data wykonania</td>
  11. <td style="text-align: center; background-color: rgb(204, 204, 255); width: 75px;"></td>
  12. </tr>
  13. <tr><td style="text-align: center; background-color: rgb(204, 204, 255);">4</td>
  14. <td style="text-align: center; background-color: rgb(233, 233, 255); ">Lukasz</td>
  15. <td style="text-align: center; background-color: rgb(233, 233, 255); "><font face="Andale Mono">0014F8FFB5AA</font></td>
  16. <td style="text-align: center; background-color: rgb(233, 233, 255); "></td>
  17. <td style="text-align: center; background-color: rgb(233, 233, 255); "></td>
  18. <td style="text-align: center; background-color: rgb(233, 233, 255); ">2007.11.19</td>
  19. <td style="text-align: center; background-color: rgb(233, 233, 255); "><form name="input" action="qadd.php" method="post"><input type="hidden" name="id" value="24"><input type="hidden" name="dataw" value="2007.11.20"><input type="submit" value="Dziś"></form><form name="input" action="qadd.php" method="post"><input type="hidden" name="id" value="24"><input type="hidden" name="dataw" value="2007-11-19"><input type="submit" value="Wczoraj"></form></td>
  20. <td style="text-align: center; background-color: rgb(233, 233, 255); "><a href="delete.php?id=24"><img style="width: 16px; height: 16px;" alt="delete" src="delete.gif"></a> - <a href="edit.php?id=24"><img style="width: 16px; height: 16px;" alt="edit" src="edit.gif"></a></td>
  21. </tr>
  22. </tbody>


Ten post edytował Sir_Yaro 20.11.2007, 15:59:42
Go to the top of the page
+Quote Post
in5ane
post 20.11.2007, 13:09:20
Post #2





Grupa: Zarejestrowani
Postów: 1 335
Pomógł: 34
Dołączył: 9.11.2005
Skąd: Wrocław

Ostrzeżenie: (10%)
X----


Nie doczytałem do końca, bo mi sie nie chce, ale masz wskazówkę:
  1. <tr>
  2. <td>Login:</td>
  3. <td><input type="text"></td>
  4. </tr>
  5. <tr>
  6. <td>Hasło:</td>
  7. <td><input type="password"></td>
  8. </tr>


Ten post edytował in5ane 20.11.2007, 13:10:04


--------------------
> > > Tworzenie stron < < <
Go to the top of the page
+Quote Post
Cysiaczek
post 20.11.2007, 13:35:45
Post #3





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




Popraw proszę tytuł topiku na zgodny z zasadami forum Przedszkole


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
Go to the top of the page
+Quote Post
Sir_Yaro
post 20.11.2007, 16:00:45
Post #4





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 3.01.2004

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


Cytat(in5ane @ 20.11.2007, 13:09:20 ) *
Nie doczytałem do końca, bo mi sie nie chce, ale masz wskazówkę:
  1. <tr>
  2. <td>Login:</td>
  3. <td><input type="text"></td>
  4. </tr>
  5. <tr>
  6. <td>Hasło:</td>
  7. <td><input type="password"></td>
  8. </tr>

no to wydaje mi sie ze tak wlasnie mam.
i to jest wg tego co podaje walidator i wiele postow nawet na tym forum zle...
Go to the top of the page
+Quote Post
deirathe
post 20.11.2007, 16:06:00
Post #5





Grupa: Zarejestrowani
Postów: 426
Pomógł: 32
Dołączył: 24.05.2007

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


No to zależy czy walidujesz z html czy z xhtml jezeli xhtml to wszystkie tagi musza byc zamkniete, np zamiast
  1. <input type="text" name="nazwa">
powinno byc:
  1. <input type="text" name="nazwa" />

niektore tagi powinny posiadac pewne atrybuty itd... zreszta na w3c walidator powinien ci powiedziec w ktorej lini co jest nie tak i co radzi smile.gif
co do tabeli to powinna zawiraqc conajmniej tag <tbody> zaraz po tagu <table> i powinny byc prawidlowo pozamykane

Ten post edytował deirathe 20.11.2007, 16:07:31


--------------------
Kawałek mojego blogu
Everything should be as simple as possible but not simpler.
A Einstein
Go to the top of the page
+Quote Post
Sir_Yaro
post 21.11.2007, 09:56:40
Post #6





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 3.01.2004

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


Dostaje tylko 2 bledy (ponizej). Ktore mi mowia tylko tyle co juz napisalem. ze jest zle i ze tak nie mozna.... sad.gif
Wszystko co napisalicie wydaje mi sie ze mam juz w kodzie od poczatku...

Cytat
Line 99, Column 43: document type does not allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag.
<input type="hidden" name="id" value="21">



The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

to jest chyba sedno problemu
Cytat
Line 107, Column 7: end tag for "FORM" which is not finished.
</form>



Most likely, you nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.
oczywiscie sa zamkniete w poprawnej kolejnosci

Udalo mi sie rozwiazac (a raczej ominac) polowicznie problem.

  1. <form>
  2. <table>
  3. <tr>
  4. <td>
  5. (RESZTA FORMULARZA)
  6. <td>
  7. </tr>
  8. </table>
  9. </form>

teraz sie waliduje poprawnie.

Problem jest jednak z drugim formularzem. Jak do tej samej komorki wrzucic 2go formularz questionmark.gifquestionmark.gif Przeciz nie moge wyrzucic 2go znacznika form przed table bo sie wszystko w komorce wymiesza.....

Ten post edytował Sir_Yaro 21.11.2007, 10:01:32
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: 6.07.2025 - 09:02