When i'm tryng to click the button i'm ghetting an error : popup is not defined , i have no ideea what to do
<input href="#dialog" type='button' value='Open' onclick="popup(<?php echo $image['image_id']; ?>); return false;" />
<script type="text/javascript">
function popup(image_id){
$.ajax({
cache: false,
type: 'POST',
url: 'popup.php',
data: 'image_id=' + encodeURIComponent(image_id),
success: function(data) {
}
});
}
</script>