![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 6 Pomógł: 0 Dołączył: 6.04.2002 Skąd: Lubaczow Ostrzeżenie: (0%) ![]() ![]() |
Witam!
Napisalem prosty skrypt: Kod <script language="javascript"> var countInputs = 0; function dodajInput() { document.getElementById('inputLayer').innerHTML+='<br /><input name="userfile_'+countInputs+'" type="file" />'; countInputs++; } </script> i formularz do tego: Kod <form enctype="multipart/form-data" method="post"> <div id="inputLayer"> <input type="hidden" name="MAX_FILE_SIZE" value="900000" /> </div> <input type="submit" value="Send File" /> </form> <a href="javascript:dodajInput();">Dodaj pole formularza</a> Problem w tym, że klikając w link dodający nowe pole formularza kasuje mi się wcześniej wpisana wartość w innych polach input. Jak to naprawić? |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 6 Pomógł: 0 Dołączył: 10.11.2003 Ostrzeżenie: (0%) ![]() ![]() |
A tak, zapomnialem dodac, ze IE.
Standardowo jako parametr metody createElement() podaje sie "input", "td", "tr" itp. A parametry obiektu definiuje sie osobno. IE jest w tym temacie bardziej tolerancyjny i troszke rozleniwia (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg) Pozdrawiam Serg Ten post edytował Serg_ 16.07.2004, 13:21:47 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 13.10.2025 - 06:11 |