1

I have, inside an HTML page, this link:

https://view-awesome-table.com/-L1O9CTIgXRslCew09ji/view?filterA=Citrus

This is my HTML code:

<!DOCTYPE html>
<html>
<body>

<a href="https://view-awesome-table.com/-L1O9CTIgXRslCew09ji/view?filterA=Citrus" target="_blank">
     <button type = "button"> BUTTON 2 </ button>
</a>

</body>
</html>

When I click on it, in the page that opens the parameters (?FilterA=Citrus) have no effect.

But if I copy and paste the same link in the browser's address bar, the parameters take effect.

I do not understand these different results. The result that I would like is that clicking the link will have the same effect as entering the URL in the address bar of the browser. Can someone help me understand?

unor
  • 92,415
  • 26
  • 211
  • 360

1 Answers1

0

Eihter u use anchor tag or button tag ,

See this post: Can I nest a <button> element inside an <a> using HTML5?

use anchor tag like bellow and use css to as like button .

.btn{
    padding: 6px 41px;
    font-size: 16px;
     font-weight: 700;
    line-height: 1.71429
    border-radius: 5px;
    border: 2px solid;
    text-transform: uppercase;
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
    cursor: pointer;
    text-decoration: none;
    
  }
<a href="https://view-awesome-table.com/-L1O9CTIgXRslCew09ji/view?filterA=Citrus" target="_blank" class="btn" > BUTTON 2</a>
Axiom_shuvo
  • 73
  • 1
  • 7
  • Thanks for the answer Axiom_shuvo. I tried to follow your advice but unfortunately the result does not change. :-( – Furio Zamboni Jan 20 '18 at 20:36
  • there is nothing in my code ,maybe js/jquery prevent the click event. have any code like on click anchor e.preventDefault(); ??????? – Axiom_shuvo Jan 21 '18 at 07:33