J
jeffkretz
The ValidationSummaryOnSubmit method, which is a built-in microsoft
javascript method for handling the validation summary control has a
bug.
It uses 5 variables for rendering the control:
headerSep,first,pre,post,end.
However, these variables are NOT defined with the "var" keyword, so
they are not treated as local variables, but global variables.
I happened to have a span on the page <span id="end"/>, which Internet
Explorer for some reason treats as a global variable.
alert(end==document.getElementById('end')) returns "true" in IE7.
When I try to use the ValidationSummary control, a javascript error is
thrown, because the command:
end = "</ul>"
fails, as the global variable "end" is protected as representing the
DOM object.
I solved this by renaming my DOM element to something else, but this
is just sloppy javascript (omitting the "var" declaration to make a
set of local variables). I'd like to submit this to MS so they could
address the issue, but I couldn't for the life of me figure out how to
do it.
Any ideas?
JK
javascript method for handling the validation summary control has a
bug.
It uses 5 variables for rendering the control:
headerSep,first,pre,post,end.
However, these variables are NOT defined with the "var" keyword, so
they are not treated as local variables, but global variables.
I happened to have a span on the page <span id="end"/>, which Internet
Explorer for some reason treats as a global variable.
alert(end==document.getElementById('end')) returns "true" in IE7.
When I try to use the ValidationSummary control, a javascript error is
thrown, because the command:
end = "</ul>"
fails, as the global variable "end" is protected as representing the
DOM object.
I solved this by renaming my DOM element to something else, but this
is just sloppy javascript (omitting the "var" declaration to make a
set of local variables). I'd like to submit this to MS so they could
address the issue, but I couldn't for the life of me figure out how to
do it.
Any ideas?
JK