# Javascript widget not showing on Wix site

**URL:** <https://forum.wixstudio.com/t/javascript-widget-not-showing-on-wix-site/7193>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [July 18, 2018, 5:31pm UTC](https://forum.wixstudio.com/t/javascript-widget-not-showing-on-wix-site/7193 "2018-07-18T17:31:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmichael](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@jmichael](https://forum.wixstudio.com/u/jmichael)\
**Post date:** [July 18, 2018, 5:31pm UTC](https://forum.wixstudio.com/t/javascript-widget-not-showing-on-wix-site/7193/1 "2018-07-18T17:31:39Z")

</div>

I’m having issues getting the following code to show up on my site. I’ve tried using the html iframe but the widget is not visible when I publish my site.

---

<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:** [July 19, 2018, 12:18am UTC](https://forum.wixstudio.com/t/javascript-widget-not-showing-on-wix-site/7193/2 "2018-07-19T00:18:30Z")

</div>

It does not seem that code actually connects the widget to some DOM element anywhere, is it working if you run it outside Wix?

---

<div class="post-metadata">

**Author:** ![jmichael](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@jmichael](https://forum.wixstudio.com/u/jmichael)\
**Post date:** [July 19, 2018, 1:30pm UTC](https://forum.wixstudio.com/t/javascript-widget-not-showing-on-wix-site/7193/3 "2018-07-19T13:30:37Z")

</div>

Yes. That’s actually just the code from the SmartRecruiters widget. Here’s the code after I pasted it in the iframe.

// For full API documentation, including code examples, visit [Velo API Reference - Wix.com](http://wix.to/94BuAAs)

$w.onReady( function () {  
//TODO:

write your page related code here... 

});

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [July 22, 2018, 11:33am UTC](https://forum.wixstudio.com/t/javascript-widget-not-showing-on-wix-site/7193/4 "2018-07-22T11:33:39Z")

</div>

You will need to paste your code into an [HtmlComponent](https://www.wix.com/code/reference/$w.HtmlComponent.html) (iFrame). For more information, see the article [Working with the HTML Component in Wix Code](https://support.wix.com/en/article/working-with-the-html-component-in-wix-code#embedding-a-widget) .

---

<div class="post-metadata">

**Author:** ![jmichael](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@jmichael](https://forum.wixstudio.com/u/jmichael)\
**Post date:** [July 23, 2018, 1:14am UTC](https://forum.wixstudio.com/t/javascript-widget-not-showing-on-wix-site/7193/5 "2018-07-23T01:14:26Z")

</div>

I’ve pasted the code into an iframe several times but the code doesn’t show up. I do receive the error “parsing error: unexpected token”.

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

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [July 23, 2018, 5:59am UTC](https://forum.wixstudio.com/t/javascript-widget-not-showing-on-wix-site/7193/6 "2018-07-23T05:59:51Z")

</div>

I see from your screenshot that you did not paste into an [HtmlComponent](https://www.wix.com/code/reference/$w.HtmlComponent.html) (iFrame) - you pasted your code into the Page code. This is incorrect and will not work.

You need to paste your code into an [HtmlComponent](https://www.wix.com/code/reference/$w.HtmlComponent.html) (iFrame), like this:

 ![](https://us1.discourse-cdn.com/wix/original/3X/b/b/bb78bcdc6b148266cd875b7cfd1806d67985fb20.png)  
Refer to the documentation that I linked to in my previous post for more information: [HtmlComponent](https://www.wix.com/code/reference/$w.HtmlComponent.html) (iFrame) API, and the article [Working with the HTML Component in Wix Code](https://support.wix.com/en/article/working-with-the-html-component-in-wix-code#embedding-a-widget) .
