Skip to content

How to pass a value from Node.js server to an embedded Javascript code inside HTML page?  #3416

Description

@Mqzzaz

Hi guys. I'm working on this project in which i need to pass a data brought from Mysql database via Node js server to HTML page that has embedded Javascript code to use this data to draw a chart by using Chart.js library.
This is the node.js code:
Image with credentials removed. // @ChALkeR
and here the HTML page(index.ejs) where i want to use the "title" array values inside the script to fill the "data" array for the chart
Chicago commercial photographers
So, if i tried to use the "title" directly , nothing would show up in the page(blank page).
Any solution?

Activity

ChALkeR commented on Oct 17, 2015

@ChALkeR
Member

@Mqzzaz This does not look like it's an issue with Node.js.
If you believe that it is an issue, please make a self-contained test case that works incorrectly (or fails), without any dependencies on third-party modules.

If this is a support question, then you are asking for help in the wrong place. Please ask on the nodejs/help repo, IRC, Gitter, or StackOverflow.

Also, that looks like a thirdparty module related question, you should check if that module has a preferrable way of asking support.

tflanagan commented on Oct 18, 2015

@tflanagan
Contributor

You should remove those images. They contain data that you don't want the public to know.

ChALkeR commented on Oct 18, 2015

@ChALkeR
Member

@tflanagan Done, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionIssues asking questions about Node.js.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions