|
View:
New views
14 Messages
—
Rating Filter:
Alert me
|
|
|
Using the navigation page for org.apache.forrest.plugin.inpu |
|
|
Re: Using the navigation page for org.apache.forrest.plugin.inpu |
|
|
<a name="xxx"> being added for @idHello,
I need your expert advice on the following. I use javaScript code via <script>....</script> inside xml file which 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. 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 does? 2) What could be a better workaround than the hack that I did? Praveen |
|
|
RE: Using the navigation page for org.apache.forrest.plugin.inpu |
|
|
Re: <a name="xxx"> being added for @idDr. Bhatia Praveen wrote:
> Hello, > I need your expert advice on the following. > I use javaScript code via <script>....</script> inside xml file which > 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. eh? 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 does? 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. Ross |
|
|
RE: <a name="xxx"> being added for @idHi,
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 name attribute but when in the JavaScript I did: alert(document.getElementById("xxx").name) it gave "xxx" ! 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 changes made to its value by JavaScript. I use internet explorer Version 6.0 (Japanese version). Could it be due the browser? Praveen -----Original Message----- From: Ross Gardler [mailto:rgardler@...] Sent: Wednesday, June 25, 2008 6:07 AM To: user@... Subject: Re: <a name="xxx"> being added for @id Dr. Bhatia Praveen wrote: > Hello, > I need your expert advice on the following. > I use javaScript code via <script>....</script> inside xml file which > 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. eh? 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 does? 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. Ross |
|
|
RE: Using the navigation page for org.apache.forrest.plugin.inpu |
|
|
Re: Using the navigation page for org.apache.forrest.plugin.inpu |
|
|
Re: Using the navigation page for org.apache.forrest.plugin.inpu |
|
|
Re: <a name="xxx"> being added for @id[Please use inline responses, it makes the archives more readable]
Dr. Bhatia Praveen wrote: > Hi, > 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 > name attribute but when in the JavaScript I did: > alert(document.getElementById("xxx").name) it gave "xxx" ! Can you please post a snippet of the HTML and javascript that is 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 > changes made to its value by JavaScript. Likewise, please provide the same snippets that display this behaviour. > I use internet explorer Version 6.0 (Japanese version). Could it be due the > browser? I doubt it. Lets try some experimentation. Ross > > Praveen > > -----Original Message----- > From: Ross Gardler [mailto:rgardler@...] > Sent: Wednesday, June 25, 2008 6:07 AM > To: user@... > Subject: Re: <a name="xxx"> being added for @id > > Dr. Bhatia Praveen wrote: >> Hello, >> I need your expert advice on the following. >> I use javaScript code via <script>....</script> inside xml file which >> 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. > > eh? > 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 > does? > > 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. > > Ross > |
|
|
|
|
|
Re: Using the navigation page for org.apache.forrest.plugin.inpu |
|
|
Japanese string: Difference between static pages and servlet pagesHi,
I wrote a Japanese string in index.xml and processed it to .html files in the servlet mode ("Forrest run" seen under localhost). The string is showing fine. However, when I convert it into static site (Forrest site), the string is corrupted and also gives an error "that it is not ending with quote" (In the corrupted string viewed by Open Source of IE, the end quote is also seems to be lost). What is the difference between the processing of the index.xml page, under Forrest run & Forrest site, which could cause this problem? .. and how can I overcome it? Regards Praveen |
|
|
Re: Japanese string: Difference between static pages and servlet pagesOn Tue, 2008-07-01 at 13:23 +0900, Dr. Bhatia Praveen wrote:
> Hi, > I wrote a Japanese string in index.xml and processed it to .html files in > the servlet mode ("Forrest run" seen under localhost). The string is showing > fine. > However, when I convert it into static site (Forrest site), the string is > corrupted and also gives an error "that it is not ending with quote" This error seems to be related with an entity. Not sure about japanese but I reckon you need send us some more information. 1) We need the source code of the string when requested in servlet mode. 2) we need the string in the xml file. In general my guess is encoding problems. salu2 > (In the > corrupted string viewed by Open Source of IE, the end quote is also seems to > be lost). > > What is the difference between the processing of the index.xml page, under > Forrest run & Forrest site, which could cause this problem? .. and how can > I overcome it? > > Regards > Praveen > Thorsten Scherler thorsten.at.apache.org Open Source Java consulting, training and solutions |
| Free Forum Powered by Nabble | Forum Help |