# Can Web Browser component be linked with Tab Strip component

**URL:** <https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073>\
**Category:** General Discussion\
**Created:** [September 18, 2014, 2:27pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073 "2014-09-18T14:27:04Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![pstojakovic](https://avatars.discourse-cdn.com/v4/letter/p/e68b1a/32.png) [@pstojakovic](https://forum.inductiveautomation.com/u/pstojakovic)\
**Post date:** [September 18, 2014, 2:27pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073/1 "2014-09-18T14:27:04Z")

</div>

Here’s the scenario:

I have two tabs, one is Google, other is Yahoo. When I click on Google Tab I want web browser to go to [Google.com](http://Google.com) web page, when I click on Yahoo Tab I want web browser to go to [Yahoo.com](http://Yahoo.com) web page. How do I link Tabs to Web browser component?

Thanks.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [September 18, 2014, 3:22pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073/2 "2014-09-18T15:22:47Z")

</div>

You can bind the Starting URL property in the Web Browser. As an example, I put a Web Browser into a window, and added two buttons. One has an actionPerformed script of `event.source.parent.getComponent('Web Browser').startingUrl = "www.google.com"` and the other has a script of `event.source.parent.getComponent('Web Browser').startingUrl = "www.yahoo.com"` Clicking on each of them sends the browser to the appropriate site.

---

<div class="post-metadata">

**Author:** ![pstojakovic](https://avatars.discourse-cdn.com/v4/letter/p/e68b1a/32.png) [@pstojakovic](https://forum.inductiveautomation.com/u/pstojakovic)\
**Post date:** [September 18, 2014, 5:08pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073/3 "2014-09-18T17:08:53Z")

</div>

OK, that’s for using Buttons, however, would I need to create custom property (dataset) for the Tabs and include both URLs. How would the script look like then?

Thanks.

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [September 18, 2014, 5:27pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073/4 "2014-09-18T17:27:24Z")

</div>

Bind the starting startingUrl to selectedTab of the tabstrip.  
If you have two tabs called “google” and “yahoo” use the following expression on the binding.

```auto
concat("www.",{Root Container.Tab Strip.selectedTab},".com")
```

---

<div class="post-metadata">

**Author:** ![pstojakovic](https://avatars.discourse-cdn.com/v4/letter/p/e68b1a/32.png) [@pstojakovic](https://forum.inductiveautomation.com/u/pstojakovic)\
**Post date:** [September 18, 2014, 5:56pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073/5 "2014-09-18T17:56:49Z")

</div>

Cool, it works. Now, is Web browser able to view PDF documents. What file extension is it compatible with? For videos and images specifically?

Thanks.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [September 18, 2014, 6:19pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073/6 "2014-09-18T18:19:11Z")

</div>

The Web Browser is based on the Chromium engine, so anything a stock Chromium engine can display (note: this is NOT the same as what Google Chrome can display, even though it is based on Chromium).

I haven’t heard of any still image formats that cause problems. For video, I know the h.264 codec can’t be displayed, but I don’t know of other issues.

---

<div class="post-metadata">

**Author:** ![pstojakovic](https://avatars.discourse-cdn.com/v4/letter/p/e68b1a/32.png) [@pstojakovic](https://forum.inductiveautomation.com/u/pstojakovic)\
**Post date:** [September 18, 2014, 6:39pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073/7 "2014-09-18T18:39:47Z")

</div>

I tested to see if it can open a PDF file, but it asks me to save the file instead. So, I guess it can’t view PDF unless there is some kind of plug-in for PDFs.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [September 18, 2014, 7:28pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073/8 "2014-09-18T19:28:38Z")

</div>

The [most recent version](http://files.inductiveautomation.com/release/build7.7.1-rc3/2014091012/Web%20Browser-module.modl) of the module can view pdfs. The version that shipped with 7.7.0 couldn’t.

---

<div class="post-metadata">

**Author:** ![pstojakovic](https://avatars.discourse-cdn.com/v4/letter/p/e68b1a/32.png) [@pstojakovic](https://forum.inductiveautomation.com/u/pstojakovic)\
**Post date:** [September 18, 2014, 8:35pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073/9 "2014-09-18T20:35:55Z")

</div>

Awesome it works, it doesn’t seem to work with flash videos like .flv or .swf…what kind does it support?

Thanks.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [September 18, 2014, 8:53pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073/10 "2014-09-18T20:53:16Z")

</div>

I would think that [the Chromium audio/video webpage](http://www.chromium.org/audio-video) would be a good source. Remember to only go by the Chromium lists, not the Chrome lists. 😃

If you have control over the client machines, you can install plug-ins. Adobe, for example, gives [instructions](http://helpx.adobe.com/flash-player/kb/flash-player-chromium.html#id_34233) on how to make Flash play with Chromium.

---

<div class="post-metadata">

**Author:** ![pstojakovic](https://avatars.discourse-cdn.com/v4/letter/p/e68b1a/32.png) [@pstojakovic](https://forum.inductiveautomation.com/u/pstojakovic)\
**Post date:** [September 19, 2014, 2:46pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073/11 "2014-09-19T14:46:41Z")

</div>

Lets say I want to play samplevideo.flv on the browser itself, So I provide the link for it. I open it and it won’t play the video. Is that with all video formats? I cant just open a direct link to a video. Do videos need to be embedded with HTML code in order to play in the Web Browser?

Thanks.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [September 19, 2014, 4:06pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073/12 "2014-09-19T16:06:43Z")

</div>

Good question.

I just went to [http://www.dhs.state.il.us/accessibility/tests/flash/video.html](http://www.dhs.state.il.us/accessibility/tests/flash/video.html) in the Web Browser component, and had no problem viewing the video (although it does take a couple of seconds to load). So that tells me that flash video embedded in html works (at least on my machine).

Then I tried [http://www.mediacollege.com/video-gallery/testclips/barsandtone.flv](http://www.mediacollege.com/video-gallery/testclips/barsandtone.flv), a link directly to a flash video file. Not unexpectedly, the Web Browser asked me if I’d like to save it (the same thing happened in my regular web browser). So a direct link to the video itself doesn’t work.

---

<div class="post-metadata">

**Author:** ![pstojakovic](https://avatars.discourse-cdn.com/v4/letter/p/e68b1a/32.png) [@pstojakovic](https://forum.inductiveautomation.com/u/pstojakovic)\
**Post date:** [September 19, 2014, 4:17pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073/13 "2014-09-19T16:17:28Z")

</div>

Yea, I can watch Youtube and other flash videos with no problem, but trying to watch a video link does not work. So I think because it is a “Web Browser” it requires HTML code to wrap around the videos.

---

<div class="post-metadata">

**Author:** ![pstojakovic](https://avatars.discourse-cdn.com/v4/letter/p/e68b1a/32.png) [@pstojakovic](https://forum.inductiveautomation.com/u/pstojakovic)\
**Post date:** [November 12, 2014, 5:38pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073/14 "2014-11-12T17:38:15Z")

</div>

Off topic question but, I have a integer tag and I want to display the word “Hello World” when the tag changes to 2. How do I write script for it?

Thanks.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [November 12, 2014, 6:18pm UTC](https://forum.inductiveautomation.com/t/can-web-browser-component-be-linked-with-tab-strip-component/9073/15 "2014-11-12T18:18:06Z")

</div>

Best to put a new topic in a new topic – you’re much more likely to get a useful reply. 🙂
