1 // Module to modify the fields of device name and mail address
\r
2 // used in macupdate.html in lang(ja/en) directory
\r
4 // get string of clicked field and insert edited string
\r
5 function editstring(macAddress, strType, thisItem){
\r
7 newStr = prompt("Edit "+strType, thisItem.innerHTML);
\r
9 thisItem.innerHTML=newStr;
\r
10 insertHiddenInput(macAddress, strType+" "+newStr);
\r
14 // insert hidden input field for saving the edited string
\r
15 // this string is sent at clicking the submit button
\r
16 function insertHiddenInput(hname, hvalue){
\r
18 var parent, hiddenInput;
\r
19 parent = document.getElementById('hidden');
\r
20 hiddenInput = document.createElement('input');
\r
21 hiddenInput.type = 'hidden';
\r
22 hiddenInput.name = hname;
\r
23 hiddenInput.value = hvalue;
\r
24 parent.appendChild(hiddenInput);
\r