Can't add text in textarea on click listener
Page 1 of 1
Can't add text in textarea on click listener
Version: AwesomeBB.
So, I created my own div, added image in it and now I made a script as well to trigger onClick event. HTML:
JS code:
For unknown reason to me, this doesn't work. Nothing happens.
So, I created my own div, added image in it and now I made a script as well to trigger onClick event. HTML:
- Code:
<div id="personal_social">
<img src="https://i.ibb.co/fHQdty7/317731-pinterest-social-social-media-icon-20x20.png" title="Pinterest" id="pinterest_img" />
</div>
JS code:
- Code:
let pinterest_image = document.getElementById("pinterest_img");
pinterest_image.addEventListener("click", function() {
let textarea = document.getElementById("text_editor_textarea");
textarea.value += "test";
});
For unknown reason to me, this doesn't work. Nothing happens.
Last edited by System32 on November 9th 2022, 11:21 pm; edited 1 time in total
Guest- Guest
Re: Can't add text in textarea on click listener
Are you trying to add a Pinterest share button to messages? If yes, you do know there is already a share link for Pinterest, correct?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Can't add text in textarea on click listener
I just realized there is button for embed code. The icon is so weird I would never clicked it. Solved.
Guest- Guest
Re: Can't add text in textarea on click listener
Problem solved & topic archived.
|
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» Click-To-View Text
» Inserting Text and Click Submit in an HTML page
» I cann't see "Forum Terms of service" text when i click register button.
» Textarea Background for phpbb3
» How to get this textarea to my site
» Inserting Text and Click Submit in an HTML page
» I cann't see "Forum Terms of service" text when i click register button.
» Textarea Background for phpbb3
» How to get this textarea to my site
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum