I have a simple slider function in JavaScript, and it works on online compliers, but it seems like none of my JS code will work in Tiny.
Is there something I am missing, or is it even possible to use JS with Tiny?
Thank you
Fareed Khamitov
Java Script in TinyMCE
-
- AllPro Expert
- Posts: 4
- meble kuchenne Mikołów Knurów Czechowice-Dziedzice
- Joined: Mon Jul 27, 2020 12:15 pm
- Website: www.socialreachagency.com
- Dave
- Support Team
- Posts: 1222
- Joined: Wed May 11, 2011 10:30 am
- Website: www.allprowebtools.com
- Contact:
Re: Java Script in TinyMCE
It is possible to use javascript. Please include more details about what you are doing and the problem you are encountering.
-
- AllPro Expert
- Posts: 4
- Joined: Mon Jul 27, 2020 12:15 pm
- Website: www.socialreachagency.com
Re: Java Script in TinyMCE
<h2>JavaScript in Body</h2>
<p id="demo">A Paragraph.</p>
<button type="button" onclick="myFunction()">Try it</button>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Paragraph changed.";
}
</script>
This is the tester function I got from W3schools to test. Should change "A paragaraph" to "Paragraph Changed" after a click on the button. It does work on online html complier and the W3 complier, but when I use it in tiny the button is not clickable. Same problem was with the slider, the arrows were non-responsive.
Thank you.
<p id="demo">A Paragraph.</p>
<button type="button" onclick="myFunction()">Try it</button>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Paragraph changed.";
}
</script>
This is the tester function I got from W3schools to test. Should change "A paragaraph" to "Paragraph Changed" after a click on the button. It does work on online html complier and the W3 complier, but when I use it in tiny the button is not clickable. Same problem was with the slider, the arrows were non-responsive.
Thank you.
- Dave
- Support Team
- Posts: 1222
- Joined: Wed May 11, 2011 10:30 am
- Website: www.allprowebtools.com
- Contact:
Re: Java Script in TinyMCE
Please provide the URL so that we can inspect the code.
-
- AllPro Expert
- Posts: 4
- Joined: Mon Jul 27, 2020 12:15 pm
- Website: www.socialreachagency.com