# Html with javascript to show departure monitor

**URL:** https://discourse.nodered.org/t/html-with-javascript-to-show-departure-monitor/59933
**Category:** General
**Created:** [16 March 2022 15:28 UTC](https://discourse.nodered.org/t/html-with-javascript-to-show-departure-monitor/59933 "2022-03-16T15:28:20Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Unglaublich](https://avatars.discourse-cdn.com/v4/letter/u/439d5e/32.png) [@Unglaublich](https://discourse.nodered.org/u/Unglaublich)
#### Post date: [16 March 2022 15:28 UTC](https://discourse.nodered.org/t/html-with-javascript-to-show-departure-monitor/59933/1 "2022-03-16T15:28:20Z")

</div>

Hello friends,

i try to show a departure monitor but the dashboard is blank.

Which is the best way, respectively node for showing data from a web service like this:

```auto
<div class="mvv-departure-monitor" monitor-configuration="eyJsYW5ndWFnZSI6eyJkZXBhcnR1cmUiOiJBYmZhaHJ0IiwidHJhaW5TdG9wcyI6IkhhbHRlc3RlbGxlbiIsImRpcmVjdGlvbiI6IlJpY2h0dW5nIiwiZm9vdGVyTm90ZSI6IqkgQ29weXJpZ2h0IiwiZm9vdGVyVGV4dCI6IldlaXRlcmUgRmFocnBsYW5hdXNr/G5mdGUgdW50ZXIgd3d3Lm12di1hdXNrdW5mdC5kZSBvZGVyIG1pdCBkZXIgTVZWLUFwcCIsImhlYWRlclRleHQiOiJBYmZhaHJ0ZW4gZvxyIGhldXRlLCAiLCJsYW5ndWFnZSI6ImRlIiwibGluZSI6IkxpbmllIiwibGl2ZSI6IkxpdmUiLCJzdG9wIjoiSGFsdGVzdGVsbGUiLCJ0cmFjayI6IkdsZWlzIn0sImlzRnVsbHNjcmVlbiI6ZmFsc2UsInN0YXRpb25zIjpbeyJzdGF0aW9uIjp7Im5hbWUiOiJN/G5jaGVuIiwiaWQiOiJkZTowOTE2Mjo2IiwiYW55VHlwZSI6InN0b3AiLCJzdGF0ZWxlc3MiOiI5MTAwMDAwNiIsInJlZiI6eyJpZCI6IjkxMDAwMDA2IiwiZ2lkIjoiZGU6MDkxNjI6NiIsIm9tYyI6IjkxNjIwMDAiLCJwbGFjZUlEIjoiMSIsInBsYWNlIjoiTfxuY2hlbiIsImNvb3JkcyI6IjEyODY5NzIuMDAwMDAsNTg2OTgxOC4wMDAwMCJ9fSwibGluZXMiOlt7Im51bWJlciI6IlMyIiwic3ltYm9sIjoiOTJNMDIuc3ZnIiwiZGlyZWN0aW9uIjoiRXJkaW5nIiwic3RhdGVsZXNzIjoiZGRiOjkyTTAyOiA6SDpqMjIiLCJuYW1lIjoiUy1CYWhuIn1dLCJsZWFkVGltZU1pbnV0ZXMiOjEwfV0sImxpbmVzIjpbXSwibWF4UmVzdWx0cyI6MSwiZmV0Y2hJbnRlcnZhbEluTWludXRlcyI6MSwic2hvd05vdGlmaWNhdGlvbiI6ZmFsc2V9"></div>
<script type="text/javascript" src="https://www.mvv-muenchen.de/typo3conf/ext/sn_mvv_efa/Resources/Public/mvv-monitor/mvv-monitor.min.js"></script>

```

I upload a picture to show what i mean.

Many thanks in advance  
Andre

![test](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/5/156cde8abc7b06b8c51d7e5bf2f9e72f9ee7f7db.jpeg)

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [16 March 2022 21:40 UTC](https://discourse.nodered.org/t/html-with-javascript-to-show-departure-monitor/59933/2 "2022-03-16T21:40:01Z")

</div>

Not terribly clear what you are asking for.

Are you saying that you want to have a local display of data provided by a remote API?

I think that you may have ripped those 2 lines from a web page, am I right? If so, you will need to analyse how the script works in order to work out what data comes back. Not easy since only the minimised version of the code is provided.

Perhaps if you share a link that returns the web view you took the picture of, we could look at it more closely.

---

<div class="post-metadata">

### Author: ![Unglaublich](https://avatars.discourse-cdn.com/v4/letter/u/439d5e/32.png) [@Unglaublich](https://discourse.nodered.org/u/Unglaublich)
#### Post date: [17 March 2022 08:18 UTC](https://discourse.nodered.org/t/html-with-javascript-to-show-departure-monitor/59933/3 "2022-03-17T08:18:48Z")

</div>

Oh, sorry sorry for the confusion.

You can place a departure monitor generated as a service from this website:  
[Baukasten für Abfahrtsmonitore](https://www.mvv-muenchen.de/fahrplanauskunft/fuer-entwickler/homepage-services/index.html)

Open the second plus symbol to compile the information needed for your tramway station. And after click on "HTML code erzeugen" you get the code i posted. The code is for your own homepage to show the departure monitor for your tramway station (see picture in my first post). When i save the code as a html-file on my desktop and click it, it shows the departure monitor. But i would like to have it in my dashboard. (i hope my english is okay to understand, sry)

thank you for your effort  
Andre

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [17 March 2022 09:07 UTC](https://discourse.nodered.org/t/html-with-javascript-to-show-departure-monitor/59933/4 "2022-03-17T09:07:33Z")

</div>

Will try to find some time to look later unless someone beats me to it. I suspect though that the UI is largely generated via JavaScript so you would need to use a tool that triggers the JS in order to be able to get the data unless you can discover how the JS works and get it directly.

---

<div class="post-metadata">

### Author: ![Unglaublich](https://avatars.discourse-cdn.com/v4/letter/u/439d5e/32.png) [@Unglaublich](https://discourse.nodered.org/u/Unglaublich)
#### Post date: [17 March 2022 11:22 UTC](https://discourse.nodered.org/t/html-with-javascript-to-show-departure-monitor/59933/5 "2022-03-17T11:22:56Z")

</div>

OK, thank you

---

<div class="post-metadata">

### Author: ![Unglaublich](https://avatars.discourse-cdn.com/v4/letter/u/439d5e/32.png) [@Unglaublich](https://discourse.nodered.org/u/Unglaublich)
#### Post date: [21 March 2022 10:38 UTC](https://discourse.nodered.org/t/html-with-javascript-to-show-departure-monitor/59933/6 "2022-03-21T10:38:58Z")

</div>

Does anyone have an idea?

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [21 March 2022 16:51 UTC](https://discourse.nodered.org/t/html-with-javascript-to-show-departure-monitor/59933/7 "2022-03-21T16:51:47Z")

</div>

So what is generated is a set of HTML code with javascript that you can embed in another web page. As suspected, you cannot get the raw data though you might be able to decode the script possibly.

The easiest way to use this with Node-RED is to embed that code into the Dashboard by using the ui\_template node.

---

<div class="post-metadata">

### Author: ![Unglaublich](https://avatars.discourse-cdn.com/v4/letter/u/439d5e/32.png) [@Unglaublich](https://discourse.nodered.org/u/Unglaublich)
#### Post date: [23 April 2022 01:19 UTC](https://discourse.nodered.org/t/html-with-javascript-to-show-departure-monitor/59933/8 "2022-04-23T01:19:36Z")

</div>

Thank you very much. I´ll try it

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [22 June 2022 01:20 UTC](https://discourse.nodered.org/t/html-with-javascript-to-show-departure-monitor/59933/9 "2022-06-22T01:20:20Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
