# HELP: The embed video code for the database

**URL:** <https://forum.wixstudio.com/t/help-the-embed-video-code-for-the-database/15118>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [October 31, 2018, 10:38am UTC](https://forum.wixstudio.com/t/help-the-embed-video-code-for-the-database/15118 "2018-10-31T10:38:14Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![officetwebdesign](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/officetwebdesign/32/6818_2.png) [@officetwebdesign](https://forum.wixstudio.com/u/officetwebdesign)\
**Post date:** [October 31, 2018, 10:38am UTC](https://forum.wixstudio.com/t/help-the-embed-video-code-for-the-database/15118/1 "2018-10-31T10:38:14Z")

</div>

I am building a base in which I want to put embed code for movies from external [vshare.io](http://vshare.io) servers. I want the content of the database and films to be presented on item dynamic page. But I can not connect the HTML element (frame) with the contents of the database in which the embed code is. How to do it?

example embed code:

---

<div class="post-metadata">

**Author:** ![andreas-kviby](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/andreas-kviby/32/790_2.png) [@andreas-kviby](https://forum.wixstudio.com/u/andreas-kviby)\
**Post date:** [October 31, 2018, 11:03am UTC](https://forum.wixstudio.com/t/help-the-embed-video-code-for-the-database/15118/2 "2018-10-31T11:03:45Z")

</div>

Hey  
Create a field for videoUrl as text and put the [//vshare.io/v/9g94t0q/width-470/height-305/](https://vshare.io/v/9g94t0q/width-470/height-305/) inside that field and then add the iframe component to your dynamic page and using code like

```javascript
let currentItem = $w("#dataset1").getCurrentItem();
$w("#iframeComponent").src = currentItem.videoUrl;

```

Or, you could take the whole html code and store it inside a text field and then insert that chunk into a html component.

Or, you could make a standard html code snippet which will listen for the dynamic page video fields and send those from Wix Code using the postMessage of the HTML Component and then inside the html code snippet you use the onMessage and get the event.data which could consist of the video url and then load the contents of it.

---

<div class="post-metadata">

**Author:** ![officetwebdesign](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/officetwebdesign/32/6818_2.png) [@officetwebdesign](https://forum.wixstudio.com/u/officetwebdesign)\
**Post date:** [October 31, 2018, 11:58am UTC](https://forum.wixstudio.com/t/help-the-embed-video-code-for-the-database/15118/3 "2018-10-31T11:58:20Z")

</div>

I think I’m doing something wrong. I do not know about coding

 ![](https://us1.discourse-cdn.com/wix/original/3X/b/8/b89deb32c33ec9809a5f6af6f47da350c8e564a4.jpeg)

 ![](https://us1.discourse-cdn.com/wix/original/3X/7/7/77ba31eb86d6ad25becfdbab401861f975975c27.jpeg)

---

<div class="post-metadata">

**Author:** ![andreas-kviby](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/andreas-kviby/32/790_2.png) [@andreas-kviby](https://forum.wixstudio.com/u/andreas-kviby)\
**Post date:** [October 31, 2018, 12:08pm UTC](https://forum.wixstudio.com/t/help-the-embed-video-code-for-the-database/15118/4 "2018-10-31T12:08:41Z")

</div>

@officetwebdesign Hey, you get an error because you are referring to #iframeComponent in your code and the name of that component is not that I guess. Click the grey iframe and then look in the properties panel what the id is for that component.

---

<div class="post-metadata">

**Author:** ![officetwebdesign](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/officetwebdesign/32/6818_2.png) [@officetwebdesign](https://forum.wixstudio.com/u/officetwebdesign)\
**Post date:** [October 31, 2018, 12:19pm UTC](https://forum.wixstudio.com/t/help-the-embed-video-code-for-the-database/15118/5 "2018-10-31T12:19:13Z")

</div>

@andreas-kviby You’re right. I changed it but still does not display the movie on the dynamic page

 ![](https://us1.discourse-cdn.com/wix/original/3X/a/d/ad5be6000f5a292906e21a63b8dfe84b4fe73dd2.jpeg)

---

<div class="post-metadata">

**Author:** ![andreas-kviby](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/andreas-kviby/32/790_2.png) [@andreas-kviby](https://forum.wixstudio.com/u/andreas-kviby)\
**Post date:** [October 31, 2018, 12:25pm UTC](https://forum.wixstudio.com/t/help-the-embed-video-code-for-the-database/15118/6 "2018-10-31T12:25:03Z")

</div>

@officetwebdesign Ok so if you do console.log(currentItem); and then look in the developer console do you see the item there?  
Info from API about html component and the src property

> **[HtmlComponent - Velo API Reference - Wix.com](https://www.wix.com/velo/reference/$w/htmlcomponent)**
>
> An HtmlComponent is a container for internal or external HTML code.

You might have to add before let currentItem the below

$w(“#dynamicDataset”).onReady( () =\> {  
// All your code here  
});

---

<div class="post-metadata">

**Author:** ![officetwebdesign](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/officetwebdesign/32/6818_2.png) [@officetwebdesign](https://forum.wixstudio.com/u/officetwebdesign)\
**Post date:** [October 31, 2018, 1:17pm UTC](https://forum.wixstudio.com/t/help-the-embed-video-code-for-the-database/15118/7 "2018-10-31T13:17:33Z")

</div>

[@Andreas Kviby](https://forums.wixapps.net/community-discussion/help-the-embed-video-code-for-the-database?cacheKiller=1540988635358&compId=TPASection_j5ggxs3g&deviceType=desktop&height=626&instance=n3X_zDuE-2JVeAL7YoyUmCFWAsuWh-w4WmtUpMozUwM.eyJpbnN0YW5jZUlkIjoiMjViODlmMmItM2JmYy00NmNiLTg5NzgtODJiNGMwYTEyN2U3IiwiYXBwRGVmSWQiOiIxNDcyNGYzNS02Nzk0LWNkMWEtMDI0NC0yNWZkMTM4ZjkyNDIiLCJtZXRhU2l0ZUlkIjoiOTA2NDI1MmQtMTEyMi00YzNkLWE2NDctOTViMTJmYjM0YjJlIiwic2lnbkRhdGUiOiIyMDE4LTEwLTMxVDEyOjIzOjUwLjc1NloiLCJ1aWQiOiJjMzIyNWRhZS1lZWYxLTQ2MGYtYjkwOS0yYzI4MzExZWI2NjgiLCJpcEFuZFBvcnQiOiIxOTUuMTYyLjEyMC4yMTQvNTk1NzgiLCJ2ZW5kb3JQcm9kdWN0SWQiOm51bGwsImRlbW9Nb2RlIjpmYWxzZSwib3JpZ2luSW5zdGFuY2VJZCI6IjRhYzhlZTI1LTQ4YWUtNDExMC04MGFjLWI5Njc2ZGJhN2Y1YyIsImFpZCI6ImMzMjI1ZGFlLWVlZjEtNDYwZi1iOTA5LTJjMjgzMTFlYjY2OCIsImJpVG9rZW4iOiJiNWRjYmEwNi0yYWRlLTBhZjYtMmYzZi0xNzA1ZWYxMjZjYzkiLCJzaXRlT3duZXJJZCI6IjM3NTg4MjNjLWVhZjMtNDY5NC05YzA5LWNiNzBmOTU5N2VjMyJ9&locale=en&pageId=atumo&section-url=https%3A%2F%2Fwww.wix.com%2Fcode%2Fhome%2Fforum%2F&target=_top&viewMode=site&vsi=c7c14f8b-0718-4cdb-ac41-03b7dcc34790&width=980#) Thank you for professional and quick help. Thanks to you, I can generate amazing movie bases.

---

<div class="post-metadata">

**Author:** ![minthainkha2016](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/minthainkha2016/32/21724_2.png) [@minthainkha2016](https://forum.wixstudio.com/u/minthainkha2016)\
**Post date:** [July 10, 2020, 5:28am UTC](https://forum.wixstudio.com/t/help-the-embed-video-code-for-the-database/15118/8 "2020-07-10T05:28:30Z")

</div>

how to do that I have not yet

---

<div class="post-metadata">

**Author:** ![minthainkha2016](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/minthainkha2016/32/21724_2.png) [@minthainkha2016](https://forum.wixstudio.com/u/minthainkha2016)\
**Post date:** [July 10, 2020, 5:30am UTC](https://forum.wixstudio.com/t/help-the-embed-video-code-for-the-database/15118/9 "2020-07-10T05:30:47Z")

</div>

help me

 ![](https://us1.discourse-cdn.com/wix/original/3X/f/4/f4a7409da3c9492addef1b7ef81a4453a655ffa1.png)

 ![](https://us1.discourse-cdn.com/wix/original/3X/9/3/936f8e4607652a58706795e21bb56a87f57d21ed.png)

---

<div class="post-metadata">

**Author:** ![anon72313111](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@anon72313111](https://forum.wixstudio.com/u/anon72313111)\
**Post date:** [July 10, 2020, 6:37am UTC](https://forum.wixstudio.com/t/help-the-embed-video-code-for-the-database/15118/10 "2020-07-10T06:37:07Z")

</div>

This is an old post and will be closed. If you have further questions please open up a new thread with your own problem/issue.

Bumping up old posts is against the [**Community Guidelines**](https://www.wix.com/corvid/forum/community-discussion/corvid-community-guidelines) .
