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

453
Views
How to hide url on mouse hover of a hyper link

I'm my backend part of the app which is built in PHP Symfony I have HTML twig files, I want to change behavior for some href link, I want to hide URL in the bottom left corner after I hover them, I tried this solution that needs to change URL text to Contact, but it won't work

<a 
  class="activo" 
  href="link" 
  onmouseover="window.status='Contact'"
  onmouseout="window.status=''"
>
  Click
</a>

any help?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

TL;DR; Simply use JavaScript, like:

window.location.href = "https://stackoverflow.com";

Remove the "<a ...>" element's href-attribute.

Then make it trigger a JavaScript function:

<a onclick="myFunction()">my link</a>

Finally, simply use JavaScript to redirect, like:

<script type="text/javascript">
  function myFunction() {
    window.location.href = "https://stackoverflow.com";
  }
</script>

Note that you may need to add CSS to set cursor, I mean, already existing CSS may check href's existence, and not apply once href is removed.

Reusing same function

<a data-url="https://stackoverflow.com"
   onclick="myFunction(this)">my link label</a>

<!-- In case you are using Twig or Blade: -->
<a data-url="{{ 'https://example.com' }}"
   onclick="myFunction(this)">my other link</a>

<script type="text/javascript">
  function myFunction(element) {
    window.location.href = element.getAttribute('data-url');
  }
</script>
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!