| 
				Динамические создание полей ввода и заполнение их данными
			 Добрый день всем! Есть проблема, нужна ваша помощь. Надо следать форму (или неодну), где есть 2 поля : логин и пароль. также есть кнопки добавить/удалить поля ввода и кнопка генерирования логина/пароля. Как добиться того, чтобы генерировать логин/пароль во всех полях ввода? (т.е. проблема в том, что не могу получить доступ к новым полям).Идеально было б иметь массив из созданных полей и потом передать в ф-ю генерирования.
 ф-я создания полей:
 function addline()
 {
 var form_generate_login_password = getId("form_generate_login_password");
 
 var account = new Array();
 account[count] = document.createElement("div");
 account[count].setAttribute("name","account["+count+"]");
 account[count].setAttribute("id","account["+count+"]");
 
 var new_input_login = document.createElement("input");
 new_input_login.setAttribute("type","text");
 new_input_login.setAttribute("class","input_text")  ;
 new_input_login.setAttribute("name","login["+count+"]");
 new_input_login.setAttribute("id","login["+count+"]");
 account[count].appendChild(new_input_login);
 
 var new_separator = document.createElement("b");
 var new_separator_text = document.createTextNode("\u0020:\u0020");
 new_separator.appendChild(new_separator_text);
 account[count].appendChild(new_separator);
 
 var new_input_password = document.createElement("input");
 new_input_password.setAttribute("type","password")  ;
 new_input_password.setAttribute("class","input_tex  t");
 new_input_password.setAttribute("name","password["+count+"]");
 new_input_password.setAttribute("id","password["+count+"]");
 account[count].appendChild(new_input_password);
 account[count].innerHTML += "<br />";
 
 account.push(account[count].id);
 form_generate_login_password.appendChild(account[count]);
 count++;}
 
 Заранее спасибо.
 
			
			
	
			
			
			
			
			
				  |