# Javascript issue

**URL:** <https://community.elfsight.com/t/javascript-issue/48013>\
**Category:** General Questions\
**Created:** [April 17, 2024, 5:15pm UTC](https://community.elfsight.com/t/javascript-issue/48013 "2024-04-17T17:15:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Starred](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/starred/32/22691_2.png) [@Starred](https://community.elfsight.com/u/Starred)\
**Post date:** [April 17, 2024, 5:15pm UTC](https://community.elfsight.com/t/javascript-issue/48013/1 "2024-04-17T17:15:29Z")

</div>

So When I used custom JS, the code would not work, i tested it multiple times, and followed professionals

Edit: I was using node.js code and maybe Elfsight needs a preprocessor to coding additions.

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [April 17, 2024, 5:20pm UTC](https://community.elfsight.com/t/javascript-issue/48013/3 "2024-04-17T17:20:49Z")

</div>

@Starred Could you please send me a direct link to the page where the widget in question is installed?

If you’ve and removed the code from the Custom JS field of your widget, please send it right here. I’ll be happy to look into this for you 🙂

---

<div class="post-metadata">

**Author:** ![Starred](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/starred/32/22691_2.png) [@Starred](https://community.elfsight.com/u/Starred)\
**Post date:** [April 17, 2024, 5:58pm UTC](https://community.elfsight.com/t/javascript-issue/48013/4 "2024-04-17T17:58:29Z")

</div>

The widget with this issue is the “File embed” now I’m not sure if this is a bug with all things but this is what I saw, so I was trying node.js scripts, I _might_ have a fix, Maybe try adding a preprocessor to extra code additions.

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [April 17, 2024, 6:11pm UTC](https://community.elfsight.com/t/javascript-issue/48013/5 "2024-04-17T18:11:25Z")

</div>

I’ve checked your widget and couldn’t find any code in the Custom JS field:

![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/a/8/a81b2631a29f2013aa25bdddea12dc6313b747dc.png)

If you could say what you’d like to achieve and specify the code you were trying to use, we would be delighted to help 🙂

The link to the page where your widget is installed would be much helpful!

---

<div class="post-metadata">

**Author:** ![Starred](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/starred/32/22691_2.png) [@Starred](https://community.elfsight.com/u/Starred)\
**Post date:** [April 17, 2024, 6:32pm UTC](https://community.elfsight.com/t/javascript-issue/48013/6 "2024-04-17T18:32:09Z")

</div>

I deleted the code, sorry for the trouble. I realized the code was wrong itself. Sorry for the late reply yet again…

---

<div class="post-metadata">

**Author:** ![Starred](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/starred/32/22691_2.png) [@Starred](https://community.elfsight.com/u/Starred)\
**Post date:** [April 17, 2024, 6:33pm UTC](https://community.elfsight.com/t/javascript-issue/48013/7 "2024-04-17T18:33:51Z")

</div>

The issue was the connection to the embed itself, I forgot to put the file display id, but I realized I did it wrong.

---

<div class="post-metadata">

**Author:** ![Starred](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/starred/32/22691_2.png) [@Starred](https://community.elfsight.com/u/Starred)\
**Post date:** [April 17, 2024, 6:39pm UTC](https://community.elfsight.com/t/javascript-issue/48013/8 "2024-04-17T18:39:39Z")

</div>

app.get(‘/user/:id/docs’, function(req, res) {  
var id = req.params.id;  
});

I am so sorry for the trouble, I found the fix, I tried {userid} but I needed to use :id in /user/:id/docs

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [April 17, 2024, 6:47pm UTC](https://community.elfsight.com/t/javascript-issue/48013/9 "2024-04-17T18:47:51Z")

</div>

Happy to hear that you’ve found a solution 🙂

If anything else comes up, just let me know. I’ll be happy to advise!
