Revision of Using javascript with DITA from Tue, 2010-03-09 04:24
Forum topic: Submitted by Team Ferrari22 on Mon, 2010-03-08 05:25. Last updated on Tue, 2010-03-09 08:44.
Hi All,
How to use javascript with DITA
- We can give 'javascript:URL' to the 'href' attribute of <xref>,<link> and <lq> elements and it will execute it properly.
-
- e.g.<xref href="javascript:alert('Hello World');">Click here to get alert box</xref>
-
- We tried to execute javascript user defined functions from href attribute but build fails.
- We added .js files to .dita file resources and tried to refer a function from that file by href attribute.It is also not working.
Please guide us how to use .js files with DITA.
Regards.