If I have this code in AJAX success..
success: function(msg) {
var msg = $.parseJSON(msg);
new_name = msg.Name;
var html_new_name = new_name;
$('#new_project_name').append(html_new_name);
$('#myModalAlertSuccess').modal('show');
}
How can I access the variable html_new_name
in AJAX to HTML..Like this:
<a href='<?php echo base_url('generator/view_generate'.$html_new_name) ?>'>
<button type="button" class="btn btn-primary" id="view" data-dismiss="modal">
View
</button>
</a>
So that I can use the variable html_new_name
to another method in Controller
.
Or if it is not possible? Is there any other way?