I have script:
$("#consigneeBtn").on('click', function() { var id = document.getElementById('consignee').value;
})
Markup:
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> <a href="{{URL::to('consignees/', id)}}">
<button type="button" class="btn btn-default" id="consigneeBtn">Consignee</button> </a> The variable id has the value(I checked with alert) but I get UNDEFINED VARIABLE ID when I run my page
$("#consigneeBtn").on('click', function() { var id = document.getElementById('consignee').value;
})
Markup:
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> <a href="{{URL::to('consignees/', id)}}">
<button type="button" class="btn btn-default" id="consigneeBtn">Consignee</button> </a> The variable id has the value(I checked with alert) but I get UNDEFINED VARIABLE ID when I run my page