# Getting return values out of the WebBrowser

**URL:** <https://forum.inductiveautomation.com/t/getting-return-values-out-of-the-webbrowser/97020>\
**Category:** Ignition\
**Tags:** webdev, vision\
**Created:** [October 9, 2024, 1:16pm UTC](https://forum.inductiveautomation.com/t/getting-return-values-out-of-the-webbrowser/97020 "2024-10-09T13:16:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tjark\_Sterk](https://avatars.discourse-cdn.com/v4/letter/t/ac91a4/32.png) [@Tjark\_Sterk](https://forum.inductiveautomation.com/u/Tjark_Sterk)\
**Post date:** [October 9, 2024, 1:16pm UTC](https://forum.inductiveautomation.com/t/getting-return-values-out-of-the-webbrowser/97020/1 "2024-10-09T13:16:30Z")

</div>

Hey I've been playing a bit around with the web browser component in Vision and I was wondering if there is a way to get a return value or access to the logs from within the jython script.  
So something like (except this is not working since the function always returns None):

```python
browser = event.source.parent.getComponent('Web Browser')
result = browser.executeJavaScript('3+5')
print result #None but I want 8

```

Sadly my knowledge in Web Dev is limited so I was hoping some of you could help me with this.

---

<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:** [October 9, 2024, 2:33pm UTC](https://forum.inductiveautomation.com/t/getting-return-values-out-of-the-webbrowser/97020/2 "2024-10-09T14:33:54Z")

</div>

I'm pretty sure `browser.browser` (assuming browser is a reference to the outer Vision component as in your sample code) will give you a reference to the inner JxBrowser object. What you can do with that is going to depend on your version of the web browser module, and your reference is going to be the Javadocs for JxBrowser.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 9, 2024, 2:53pm UTC](https://forum.inductiveautomation.com/t/getting-return-values-out-of-the-webbrowser/97020/3 "2024-10-09T14:53:00Z")

</div>

executeJavaScript will always return none;
