Hi I have a page containing more than 50 divs. every div contain uniq user name (eg. name of students). In this page there is also a textbox. Now I want that when I click on any div. textbox value will the value of that div. how can I do that
Hi, for eg. <div id="div_1">Hello</div> <input type="text" id="text_1" name="text_1" value="new hello" onclick="javascript:updateDivVal('1') /> function updateDivVal(id){ document.getElementById('div_'+id).innerHTML=document.getElementById('text_'+id).value; } Vishal vruvishal@gmail.com