# Paste a string into the Web Browser component

**URL:** <https://forum.inductiveautomation.com/t/paste-a-string-into-the-web-browser-component/14666>\
**Category:** Ignition\
**Created:** [June 30, 2017, 5:38pm UTC](https://forum.inductiveautomation.com/t/paste-a-string-into-the-web-browser-component/14666 "2017-06-30T17:38:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DougSN](https://avatars.discourse-cdn.com/v4/letter/d/a9adbd/32.png) [@DougSN](https://forum.inductiveautomation.com/u/DougSN)\
**Post date:** [June 30, 2017, 5:38pm UTC](https://forum.inductiveautomation.com/t/paste-a-string-into-the-web-browser-component/14666/1 "2017-06-30T17:38:15Z")

</div>

I would like to make a button component copy a string from one component and paste it into a form in the Web Browser component. I used another post to figure out how to copy the string to the clipboard, but I cannot figure out how to paste it into the browser.

If I cannot do this with a single button click (since it might not be able to figure out where in the webpage to paste it) then I would like to be able to open a context menu with a Paste option when the user right-clicks in the web browser. My web browser component does not have any mouseClicked event handlers. It does put the following text into the console when I right-click though, I just don’t know how to handle it.

`10:30:14 INFO: READ: OnShowContextMenuMessage{type=OnShowContextMenu, uid=1797, 
mediaType=0, x=93, y=492, linkURL='', linkText='', srcURL='', isImageBlocked=false, 
pageURL='https://www.gs1.org/check-digit-calculator', keywordURL='', frameURL='', 
frameId=-1, frameContentState='', mediaFlags=0, selectionText='', misspelledWord='', 
frameCharset='UTF-8'}, SocketInfo{channelId=1, browserId=0, channelType=Browser}
`

We are on Ignition 7.8.4 with Web Browser module 2.8.4. Please let me know if I can offer more information.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 30, 2017, 5:51pm UTC](https://forum.inductiveautomation.com/t/paste-a-string-into-the-web-browser-component/14666/2 "2017-06-30T17:51:20Z")

</div>

My first recommendation is to upgrade to the latest version of Ignition - anything 7.9.2 or later will be on a dramatically newer version of JxBrowser, the third party library we built into the Web Browser component.

Then, I would suggest starting with the examples on this page:  
[https://jxbrowser.support.teamdev.com/support/solutions](https://jxbrowser.support.teamdev.com/support/solutions)

Notably, there’s some example Java code [here](https://jxbrowser.support.teamdev.com/support/solutions/articles/9000013715-working-with-form) to directly update an element of the web browser. The Java methods/examples used can be called directly from Ignition’s scripting, it’ll just take some work to ‘reverse-engineer’ the code to Python syntax.

---

<div class="post-metadata">

**Author:** ![DougSN](https://avatars.discourse-cdn.com/v4/letter/d/a9adbd/32.png) [@DougSN](https://forum.inductiveautomation.com/u/DougSN)\
**Post date:** [June 30, 2017, 7:25pm UTC](https://forum.inductiveautomation.com/t/paste-a-string-into-the-web-browser-component/14666/3 "2017-06-30T19:25:52Z")

</div>

Thank you, PGriffith. In case we don’t upgrade, does anyone have tips for bringing up a popup menu on right-click in the web browser?
