user3231982
user3231982

Reputation: 45

Bootstrap Button Link Not Working

Bootstrap Button Link Not Working see code below:

<ul>
  <li>
      <a href="home.aspx?Id=146">
            <button class="btn btn-primary btn">Button Link</button>             
      </a>
 </li>
</ul>

I use firebug for development, is there an easy place to see what javascript events are attached and to which objects such as this button class? find it hard to debug as don't know what code is being called and on what events for bootstrap and other external js files

Upvotes: 4

Views: 11078

Answers (2)

Carol Skelly
Carol Skelly

Reputation: 362780

Or, you can just use a link which looks like a button..

<a href="home.aspx?Id=146" class="btn btn-primary">Button Link</a>

Upvotes: 7

zzlalani
zzlalani

Reputation: 24384

Remove a tag and add window.location.href to button onclick

<button class="btn btn-primary btn" 
        onclick="window.location.href='home.aspx?Id=146'; return false;">
        Button Link
</button>

Upvotes: 2

Related Questions