0

I have two buttons on the screen..

 <div class="checksheet">
        <a href="http://some_link" target="_blank">
        <input class="btn btn-large btn-primary" type="button" value='Graph Search'>
      </a>
    </div>
    <div class="nchecksheet">
   <form action="/link" method="POST">
   <input class="btn btn-large btn-primary" type="submit" value='Analyze Topics'   onclick="$('#loading').show();">
    </form>
    <div id="loading" style="display:none; position:relative ;left:860px"><img src="{{ url_for('static', filename='img/newload.gif') }}" alt="" /></div>

</div>

The problem is.. the first button.. has hyper link over a very small part of the button.. whereas the "submit" type button.. is fine..

By fine I mean... that whole "submit" button is clickable.

and in the first part.. just a very tiny strip (top part of button) is clickable...

What am i missing.

frazman
  • 32,081
  • 75
  • 184
  • 269

2 Answers2

2

You are putting an input tag inside an anchor tag which is not possible.

I guess you are using Twitter bootstrap which btn classes can be given too <a> tag too and make them look like buttons, so you can do:

<div class="checksheet">
    <a href="http://some_link" target="_blank" class="btn btn-large btn-primary">
    Graph Search
    </a>
</div>
<div class="nchecksheet">
    <form action="/link" method="POST">
        <input class="btn btn-large btn-primary" type="submit" value="Analyze Topics" onclick="$('#loading').show();">
    </form>
    <div id="loading" class="hide" style="position: relative; left:860px;">
        <img src="{{ url_for('static', filename='img/newload.gif') }}" alt="" />
    </div>
</div>
Farid Rn
  • 3,167
  • 5
  • 39
  • 66
1

Try...

<div class="checksheet">
        <input type=button class="btn btn-large btn-primary" onClick="location.href='http://some_link'" value='Graph Search'>
    </div>
     <div class="nchecksheet">
   <input type=button class="btn btn-large btn-primary" onClick="location.href='http://some_link'; onclick="$('#loading').show();" value='Analyze Topics'>
    <div id="loading" style="display:none; position:relative ;left:860px"><img src="{{ url_for('static', filename='img/newload.gif') }}" alt="" /></div>
</div>
RandomUs1r
  • 4,010
  • 1
  • 24
  • 44