Some more info:  The generated HTML is below.

validation.js (in the css_xhtml theme) uses this line to find the
element before which to insert the new error div.
        var firstCtrNode = findWWCtrlNode(enclosingDiv); // either
wwctrl_ or wwlbl_
That function looks for a child div or span whose class matches "wwlbl"
or "wwctrl", or failing that the first span.  The generated HTML has
none of those, so firstCtrNode is undefined.  Later in validation.js is
        enclosingDiv.insertBefore(errorDiv, firstCtrNode);
When the last argument is undefined, FireFox simply inserts the errorDiv
at the end of the enclosingDiv, where IE8 complains.

So what's broken?  I've patched the .js file like this for now, but is
that the best solution?  Seems like since the code is written that way
that the templates should be generating a div or span that can be found.

My patch:
        var firstCtrNode = findWWCtrlNode(enclosingDiv); // either
wwctrl_ or wwlbl_
        if (! firstCtrNode) {
          // if we didn't find a node to insert before, use the first
child node
          firstCtrNode = enclosingDiv.firstChild;
          // if still didn't find one, simply do an alert and return
          // otherwise IE8 will complain - this should never happen
          if (! firstCtrNode) {
            alert(e);
            return;
          }
        }


My generated HTML:

<div id="wwgrp_loginform_address1" class="wwgrp">
<div id="wwctrl_loginform_address1" class="wwctrl">
<input type="text" name="address1" size="40" value=""
id="loginform_address1"/></div> </div>


Mitch

Dave Newton wrote:
> Martin Gainty wrote:
>> you can take all your JS scripts and run it thru RhinoScript
>> thats what i did for Dojo
>> http://www.rhinoscript.org
>>
>> be sure to toss in plenty of alert statements!
>
> What in the name of Bumba's porcelain alter are you talking about?
> Unless IE8 runs RhinoScript I don't see how that's going to help
> diagnose a browser-specific issue. Could you explain further?
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to