i have a small problem... i have a content-management.php,
in this page, i set $a
variable, and i calling it in script from javascript drop down select. but it is not include file layout-inc/icerik.php
.
how can i fix it ? where is my mistake?
<?php
$a = '<?php include "layout-inc/icerik.php";?>';
?>
<script>
var gm=$("#mycanvas").gridmanager({
debug:1,
customControls: {
global_col: [{ callback: 'btn', loc: 'top', iconClass: 'fa fa-th-large' }]
}
}).data('gridmanager');
$(".submit").on("click", function(e){
canvas = gm.$el.find("#" + gm.options.canvasId);
gm.deinitCanvas();
$("#mycontent").val(canvas.html());
$(this).submit();
$('.dropdown-toggle').dropdown();
});
function btn(container, btnElem) {
bootbox.dialog({
message: '<div class="container-fluid">' +
'<div class="col-md-12">' +
'<form class="form-horizontal"> ' +
'<div class="form-group"> ' +
'<label for="sel1">Select list (select one):</label>'+
'<select class="form-control" name="sel1" value="" id="sel1">'+
'<option value="<?php echo $a ;?>"> Content Module</option>'+
'<option value="tesmodule"> TEST Module</option>'+
'</select>'+
'</form> </div> </div></div>',
title: "Please select a value",
buttons:{
success: {
label: "Gönder",
className: "btn-success",
callback: function(){
var html="",
$a = document.getElementById("sel1").value,
html= $a;
gm.addEditableAreaClick(container, btnElem, html);
}
}
}
});
}
</script>