Reputation:
I have this button on my website which I am using to redirect to another page when clicked using the onclick
function. The problem is, when it is clicked, it just shows the 404 page? Any ideas why this is happening?
<button class="btn btn-sm btn-badge" type="button" onclick="location.href = 'user_page.php&show=1?badge=Available';"><i class="fa fa-sort" style="color:#963"></i> Available </button>
Upvotes: 0
Views: 121
Reputation: 843
It seems like you have your link incorrect - it should be ?
first and then &
.
Like this:
user_page.php?show=1&badge=Available
That should then solve your problem.
Upvotes: 2
Reputation: 5396
Try this :
onclick="javascript:location.href='user_page.php&show=1?badge=Available'"
Upvotes: 0