work-around for bug 18479, safe form-fill comes up blank, r=rods
git-svn-id: svn://10.0.0.236/trunk@53680 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
8216c17939
commit
137d445d78
@ -47,19 +47,45 @@
|
||||
for (i=1; !(i>=prefillList.length-2); i+=3) {
|
||||
if(prefillList[i] != 0) {
|
||||
count = prefillList[i];
|
||||
|
||||
/* the right way to do it
|
||||
* top.frames[list_frame].document.write(
|
||||
* "<tr>" +
|
||||
* "<td>" + prefillList[i+1] + ": </td>" +
|
||||
* "<td>" +
|
||||
* "<select>"
|
||||
* )
|
||||
* count--;
|
||||
* }
|
||||
* top.frames[list_frame].document.write(
|
||||
* "<option VALUE='"+prefillList[i+1]+"'>" +
|
||||
* prefillList[i+2] +
|
||||
* "</option>"
|
||||
* )
|
||||
*
|
||||
* but because of bug 18479 we have to hack things by putting the
|
||||
* <select> and the first <option> into a single write statement as follows:
|
||||
*/
|
||||
|
||||
top.frames[list_frame].document.write(
|
||||
"<tr>" +
|
||||
"<td>" + prefillList[i+1] + ": </td>" +
|
||||
"<td>" +
|
||||
"<select>"
|
||||
)
|
||||
count--;
|
||||
}
|
||||
top.frames[list_frame].document.write(
|
||||
"<select>" +
|
||||
"<option VALUE='"+prefillList[i+1]+"'>" +
|
||||
prefillList[i+2] +
|
||||
"</option>"
|
||||
)
|
||||
)
|
||||
count--;
|
||||
} else {
|
||||
top.frames[list_frame].document.write(
|
||||
"<option VALUE='"+prefillList[i+1]+"'>" +
|
||||
prefillList[i+2] +
|
||||
"</option>"
|
||||
)
|
||||
/* end of hack */
|
||||
|
||||
}
|
||||
if(count == 0) {
|
||||
top.frames[list_frame].document.write(
|
||||
"<option VALUE='"+prefillList[i+1]+"'><do not prefill></option>" +
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user