rgardler at apache
Jun 25, 2008, 1:39 AM
Post #4 of 4
[Please use inline responses, it makes the archives more readable]
Dr. Bhatia Praveen wrote:
> Intuitively I also felt strange that <a name="xxx"> and < input id="xxx">
> should get entangled this way. In the <input > element I did not give any
> alert(document.getElementById("xxx").name) it gave "xxx" !
displaying this behaviour.
> When I comment out the <a name=""> generation in the document-to-html.xsl
> alert gives "undefined" and <input id="xxx" > responds correctly to any
Likewise, please provide the same snippets that display this behaviour.
> I use internet explorer Version 6.0 (Japanese version). Could it be due the
I doubt it. Lets try some experimentation.
> -----Original Message-----
> From: Ross Gardler [mailto:rgardler [at] apache]
> Sent: Wednesday, June 25, 2008 6:07 AM
> To: user [at] forrest
> Subject: Re: <a name="xxx"> being added for @id
> Dr. Bhatia Praveen wrote:
>> I need your expert advice on the following.
>> would be rendered into html later.
>> I use a <input id="xxx"> element too.
>> I noticed that document-to-html.xsl recognizes @id and adds <a
>> name="xxx"/> before the input element, because of which the
>> document.getElementById("xxx") ends up getting the wrong element.
> getElementById does what it says. It gets the element with a given id.
> It shouldn't (can't?) return the anchor element with the name attribute.
> Are you sure you diagnosed tho real problem?
>> To overcome the problem I commented out the <a name="xxx"> generation in
>> document-to-html.xsl, which made the code work !
>> What are :
>> 1) The consequences of this change to what forrest normally expects or
> The most immediate side effect will be that table of contents and other
> cross referencing will not work.
>> 2) What could be a better workaround than the hack that I did?
> Lets see if this really in the problem.