[qmtest] FileContentsTest multiple substitutions?
eichin at metacarta.com
eichin at metacarta.com
Thu Dec 19 01:01:20 UTC 2002
This fixes it for me - I'm not sure if it is a good fix (having not
heard if anyone else has the problem, it may just be due to my not
understanding DOM) but it at least makes some sense... _Mark_
[ps. Consider this public domain, it's a trivial fix, if you need
paperwork for even this, I'll try and get it tomorrow...]
Index: file.py
===================================================================
RCS file: /home/qm/Repository/qm/qm/test/classes/file.py,v
retrieving revision 1.13
diff -u -r1.13 file.py
--- file.py 17 Oct 2002 20:38:15 -0000 1.13
+++ file.py 19 Dec 2002 00:59:12 -0000
@@ -96,7 +96,7 @@
<td> </td>
<td><input type="text"
size="40"
- name="pattern"
+ name="pattern%(name)s"
onchange="update_substitution();"
value="%(pattern)s"/></td>
</tr>
@@ -105,7 +105,7 @@
<td> </td>
<td><input type="text"
size="40"
- name="substitution"
+ name="substitution%(name)s"
onchange="update_substitution();"
value="%(replacement)s"/></td>
</tr>
@@ -113,9 +113,9 @@
<script language="JavaScript">
function update_substitution()
{
- var pattern = document.form.pattern.value;
+ var pattern = document.form.pattern%(name)s.value;
pattern = pattern.replace(/;/g, "\\;");
- var substitution = document.form.substitution.value;
+ var substitution = document.form.substitution%(name)s.value;
substitution = substitution.replace(/;/g, "\\;");
document.form.%(name)s.value = pattern + ";" + substitution;
}
More information about the qmtest
mailing list