bug 226752 and bug 220833 - 'Page info' dialog shows form fields belonging to incorrect forms; view page info/forms shows id, not name attribute

r=jag, sr=bz
This commit is contained in:
db48x%yahoo.com 2004-01-14 04:35:51 +00:00
Родитель 38d4de896a
Коммит fa324538de
2 изменённых файлов: 4 добавлений и 30 удалений

Просмотреть файл

@ -603,14 +603,12 @@ function onFormSelect()
var ft = null;
if (form.name)
ft = theBundle.getFormattedString("formTitle", [form.name]);
else
ft = theBundle.getString("formUntitled");
document.getElementById("formname").value = ft || theBundle.getString("formUntitled");
document.getElementById("formenctype").value = form.encoding || theBundle.getString("default");
document.getElementById("formtarget").value = form.target || theBundle.getString("formDefaultTarget");
var formfields = findFormControls(form);
var formfields = form.elements;
var length = formfields.length;
var i = 0;
@ -627,7 +625,7 @@ function onFormSelect()
else
val = (/^password$/i.test(elem.type)) ? theBundle.getString("formPassword") : elem.value;
fieldView.addRow(["", elem.id || elem.name, elem.type, val]);
fieldView.addRow(["", elem.name, elem.type, val]);
}
var labels = form.getElementsByTagName("label");
@ -670,17 +668,6 @@ function findFirstControl(node)
return iterator.nextNode();
}
function findFormControls(node)
{
var iterator = theDocument.createTreeWalker(node, NodeFilter.SHOW_ELEMENT, FormControlFilter, true);
var list = [];
while (iterator.nextNode())
list.push(iterator.currentNode);
return list;
}
//******** Link Stuff
function openURL(target)
{

Просмотреть файл

@ -613,14 +613,12 @@ function onFormSelect()
var ft = null;
if (form.name)
ft = theBundle.getFormattedString("formTitle", [form.name]);
else
ft = theBundle.getString("formUntitled");
document.getElementById("formname").value = ft || theBundle.getString("formUntitled");
document.getElementById("formenctype").value = form.encoding || theBundle.getString("default");
document.getElementById("formtarget").value = form.target || theBundle.getString("formDefaultTarget");
var formfields = findFormControls(form);
var formfields = form.elements;
var length = formfields.length;
var i = 0;
@ -637,7 +635,7 @@ function onFormSelect()
else
val = (/^password$/i.test(elem.type)) ? theBundle.getString("formPassword") : elem.value;
fieldView.addRow(["", elem.id || elem.name, elem.type, val]);
fieldView.addRow(["", elem.name, elem.type, val]);
}
var labels = form.getElementsByTagName("label");
@ -678,17 +676,6 @@ function findFirstControl(node)
return iterator.nextNode();
}
function findFormControls(node)
{
var iterator = theDocument.createTreeWalker(node, NodeFilter.SHOW_ELEMENT, FormControlFilter, true);
var list = [];
while (iterator.nextNode())
list.push(iterator.currentNode);
return list;
}
//******** Link Stuff
function openURL(target)
{