I have a dynamic list of links in html select which can select and redirect to another page, but i want to change it and load from modal, for one viewing of different filing forms and no longer redirect to another page.
<div class="input-group input-group-sm">
<div class="input-group-prepend ">
<span class="input-group-text">Select transaction to file</span>
</div>
<select name="toFile" id="toFile" class="toFile form-control">
<option selected disabled>Choose...</option>
@try{
for (int i = 0; i < trantypetodeserialized.Count; i++){
<option value="@trantypetodeserialized[i].menu_url">@trantypetodeserialized[i].menu_name</option>
}
}
catch (Exception) { }
</select>
<div class="input-group-append">
<button class="btn btn-secondary" name="btnToFile" id="btnToFile" type="submit">Select</button>
</div>
</div>
I'm using location.href to redirect based on the selected link.
<script>
var vFile = $('#toFile').val();
$.dialog({
icon: 'fa fa-spinner fa-spin',
title: 'Redirecting',
content: 'Please Wait...',
showConfirmButton: false,
draggable: false,
closeIcon: false
});
var linkTime = setTimeout(function () {
location.href = vFile;
clearTimeout(linkTime);
$(".jconfirm").fadeOut(100);
}, 1000)
</script>
Now, i want to display all filing forms in modal but i have no idea how to do it.
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Forms</h5>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>