JavaScript insertion on dita files
Oxygen general issues.
-
- Posts: 41
- Joined: Thu Jun 08, 2017 3:41 pm
JavaScript insertion on dita files
Hi,
I would like to insert a javascript code in my dita file but, even after reading oxygen documentation, I don't really understand. It would be for webhelp output responsive content.
The object looks like this in the HTML page of our platform :
How could I be able to insert that script on author, directly form my dita page? I have created a js file on the output for webhelp responsive.
Plus, I'm not able to use the <script> tag.
Thanks in advance.
Regards,
Jeremy
I would like to insert a javascript code in my dita file but, even after reading oxygen documentation, I don't really understand. It would be for webhelp output responsive content.
The object looks like this in the HTML page of our platform :
Code: Select all
<script type="text/javascript">
function generate() {
var login = document.getElementById('login').value;
var password = document.getElementById('password').value;
var tokenField = document.getElementById('token');
var token = 'Basic ' + btoa(login+':'+password);
tokenField.value = token;
return false;
}
</script>
</head>
<body>
<h1>
<table>
<tr>
<td><img style="margin-top:10px" src="/img/logo.png"/>
</td>
<td>APIs Authentication</td>
</tr>
</table>
</h1>
<div class="section">Token generation</div>
<p>The token value is "Basic " + base64encode(login + ":" + password)</p>
<form onsubmit="return generate()">
<table>
<tr>
<td>Login</td><td><input type="text" id="login" /></td>
</tr>
<tr>
<td>Password</td><td><input type="password" id="password" /></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Generate" /></td>
</tr>
<tr>
<td>Token</td>
<td><input type="text" id="token"></td>
</tr>
</table>
</form>
<div class="section">More infos</div>
<p>Wikipedia description</p>
<a class="gray" href="https://en.wikipedia.org/wiki/Basic_access_authentication#Client_side">https://en.wikipedia.org/wiki/Basic_access_authentication#Client_side</a>
Plus, I'm not able to use the <script> tag.
Thanks in advance.
Regards,
Jeremy
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: JavaScript insertion on dita files
Hi Jeremy,
Maybe this topic will help:
https://www.oxygenxml.com/doc/versions/ ... odes2.html
the embedded HTML content (which may contain Javascript) will appear in the HTML <body> section though.
If you want to embed the Javscript content in any HTML file generated from any DITA file and you generate WebHelp responsive from DITA you may want to use the "webhelp.fragment.head" parameter:
https://www.oxygenxml.com/doc/versions/ ... eters.html
Regards,
Radu
Maybe this topic will help:
https://www.oxygenxml.com/doc/versions/ ... odes2.html
the embedded HTML content (which may contain Javascript) will appear in the HTML <body> section though.
If you want to embed the Javscript content in any HTML file generated from any DITA file and you generate WebHelp responsive from DITA you may want to use the "webhelp.fragment.head" parameter:
https://www.oxygenxml.com/doc/versions/ ... eters.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service