No announcement yet.

Is it possible to use/read database variables in Javascript?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Is it possible to use/read database variables in Javascript?


    In my Cross Media campaign I have a database with customers. What I want is that only if a customer has confirmed their e-mail address, they can login to the website. So therefore I have a database column "Confirmed" that is filled with an "x" if the customer confirmed.

    Now I would like to have a check in Javascript on every (personal) page of my campaign, to check if the column "Confirmed" is filled with "x" and else the user is automatically send to the login page of the campaign.

    Is it possible to read out the column "Confirmed" with javascript?

    Thanks in advance.

  • #2
    Hello Mnijdam,

    it should be possible with a little workaround. Think of placing an invisible and read-only textfield on a PURL. The source of that textfield will be the databasecolumn "Confirmed". Now you set a classname to the textfield. In the javascript you now read the value of the textfield that has your designated classname.

    Maybe this can be of use for locating the textfield in the javascript:

    Kind regards,


    • Mnijdam
      Mnijdam commented
      Editing a comment
      Hi Marcel, good solution! Thanks a lot.