Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

200
Views
How do I hide specific values of a button?

I have an app that generates Bootstrap buttons that hold these sensetive values: data-value1="100" data-value2="I love you mamma" as seen in my following code.

<button id="button-0" class="btn btn-sm btn-primary" onclick="fetchValue(this)" data-value1="100" data-value2="I love you mamma">100</button>

I would like to keep these values hidden from unauthorized users, however, one is able to see these sensitive values when you click on it to inspect it via a browser like chrome. Is there a way I can hide these values while the button still holds these values?

Ideally, the following code is what I would like the user who clicks on the button to inspect it to see:

<button id="button-0" class="btn btn-sm btn-primary" onclick="fetchValue(this)">100</button>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Javascript is running on your client side, so I don't think this is actually possible.

Anything that you need to be kept secret is going to need to be server side, ideally send it from your Controller to the client side.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!