Wednesday, 2 May 2007
Bug: Diet calculator dates jump to 1900 in Internet Explorer
The \verb+get_selected_date+ JavaScript function ran afoul of another
eccentricity of ``Internet Exploder'' (both 6 and 7). All reasonable
browsers interpret the {\tt value} field of an {\tt Option} object
within a selection field as the value which will be sent to the
server when the value is selected, regardless of whether it was
specified as the text within the {\tt option} tag or as a
{\tt value=} attribute within the tag itself. But not Exploder---if
you specify the value by the text within the tags, the {\tt value} property
is blank; you have to use the {\tt text} property to obtain the
value. This resulted in changes to the diet calculator causing the
year within the start and end dates to warp back to 1900. I
modified the function to use the {\tt text} property (which, thankfully,
also works in Firefox and Opera. (Reported by Robert Ewing.)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment