javascript - Button set on Disabled but still I can click on it -
this haml code have:
%a.btn.btn-primary.personlistbtn{href:patients_path, :target => "_blank", :disabled => 'disabled'} person list
and how looks on inspect element:
<a class="btn btn-primary personlistbtn" disabled="disabled" href="/patients" target="_blank">person list</a>
so have set disabled
, , how looks disabled because color lighter other normal buttons still if click on it, working. have onclick code javascript part:
$('.personlistbtn').click(function(e) { e.preventdefault(); window.open("http://localhost:3000/patients?provider="+provider_id+"&"+"therapeutic_class="+thera_class); });
is js culprit? or how should fix this?
you creating link (the %a
) , giving link button class. disabled
attribute styling button doesn't disable links. need link or can use button?
Comments
Post a Comment