I am using jquery dialog() so a popup comes up. I want to call a php function to display information in the popup.
my code is
$(document).ready(function() {
$( "#dialog-form" )
.dialog({
autoOpen: false,
title: "Add Images",
//buttons: {"Cancel": function() { $(this).dialog("close"); }},
draggable: false,
resizable: false
});
$("#addImage").click(function() {
$( "#dialog-form" ).dialog("open");
return false;
});
});
<button id="addImage">Add Image</button>
<div id="dialog-form"> <?php function show_php(); ?>
</div>
Then I have function below:
function show_php(
echo “I need to put php code here”
);
How do I call the function show_php(); is this possible using jquery dialog();?
Use the
openevent of the query dialog to trigger an ajax call and populate it.