Javascript in Webhelp responsive output
Post here questions and problems related to editing and publishing DITA content.
Javascript in Webhelp responsive output
Hi,
There are many discussions around including Javascript to Webhelp Responsive output. I think i am not understanding something basic here.
I would like to include a dropdown button to the head/body. The button allows users to switch to different languages.
Attached is the HTML and CSS file. I am following this section of the topic to refer the HTML by using webhelp.fragment.head parameter.
https://www.oxygenxml.com/doc/versions/ ... ransformat
The output topics does not include the referred HTML.
Syed
There are many discussions around including Javascript to Webhelp Responsive output. I think i am not understanding something basic here.
I would like to include a dropdown button to the head/body. The button allows users to switch to different languages.
Attached is the HTML and CSS file. I am following this section of the topic to refer the HTML by using webhelp.fragment.head parameter.
https://www.oxygenxml.com/doc/versions/ ... ransformat
The output topics does not include the referred HTML.
Syed
Re: Javascript in Webhelp responsive output
Hi Syed,
Could you please provide us a snippet of the HTML fragment you've used and we'll try to figure out a possible cause of this problem.
If the snippet contains sensitive information, you can send it by email to support AT oxygenxml DOT com.
Regards,
Ionela
Could you please provide us a snippet of the HTML fragment you've used and we'll try to figure out a possible cause of this problem.
If the snippet contains sensitive information, you can send it by email to support AT oxygenxml DOT com.
Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Re: Javascript in Webhelp responsive output
Hi Syed,
Sorry for the delay.
Try to use only this part:
in the webhelp.fragment.head parameter and then this part:
using the webhelp.fragment.before.body parameter.
More information about various parameters:
https://www.oxygenxml.com/doc/versions/ ... eters.html
After publishing you can double check by looking inside each HTML document and see if the HTML fragments have been properly expanded.
Regards,
Radu
Sorry for the delay.
Try to use only this part:
Code: Select all
<script type="text/javascript">
function toggleVersion() {
var el = document.getElementById('menu_version');
if (el.className.match('visible')) {
el.className = 'menu_version';
} else {
el.className = 'menu_version visible';
}
}
</script>
Code: Select all
<div class="mainNav">
<div class="version">
<button class="change_version_action" onclick="toggleVersion()">Change language</button>
<p id="menu_version" class="menu_version">
<a href="../EN/EN.html" target="_blank">English</a>
<a href="../FR/FR.html" target="_blank">French</a>
</p>
</div>
</div>
More information about various parameters:
https://www.oxygenxml.com/doc/versions/ ... eters.html
After publishing you can double check by looking inside each HTML document and see if the HTML fragments have been properly expanded.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Javascript in Webhelp responsive output
Hi Ionela,
I am back to this topic now. Your suggestion had put the button at the right place. However, the toggle function of the script was not working. So, i have now copied the code from w3school. I think for some reason the Javascript code is not getting picked up by the transform.
Attaching the files for your review. The output.png in the zip displays the js.html file that is not able to be picked up by the transform. When i manually add the code to index.html, the dropdown works fine.
Can you let me know what could be the problem and the solution?
Syed
I am back to this topic now. Your suggestion had put the button at the right place. However, the toggle function of the script was not working. So, i have now copied the code from w3school. I think for some reason the Javascript code is not getting picked up by the transform.
Attaching the files for your review. The output.png in the zip displays the js.html file that is not able to be picked up by the transform. When i manually add the code to index.html, the dropdown works fine.
Can you let me know what could be the problem and the solution?
- header.zip
- (18.01 KiB) Downloaded 197 times
Return to “DITA (Editing and Publishing DITA Content)”
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