DaDaBIK
This forum is devoted to the discussion about the software DaDaBIK database front-end
the PHP Database application generator for MySQL, PostgreSQL, SQLite and MS SQL Server; also available for Wordpress.

Welcome! Log In Create A New Profile

Advanced

PDF EXPORT ERROR

Posted by drashrafsabry 
PDF EXPORT ERROR
September 13, 2018 06:15AM
enterirpise 9.1


anytime i click on pdf and even choose no template

TCPDF ERROR: Some data has already been output, can't send PDF file
Re: PDF EXPORT ERROR
September 13, 2018 06:36AM
In which form you are, details page? Results grid?
Have you modified any TCPDF files? Have you modified the default header / footer template?

________________________________________________________
Eugenio |\.-./| DaDaBIK developer and project admin
Re: PDF EXPORT ERROR
September 13, 2018 07:24AM
It is a details page
I have not touched or modified any files at all
Re: PDF EXPORT ERROR
September 14, 2018 12:36AM
It might also be some blank characters you added to config.php

Can you post both a screenshot of the error and all the content you see if, from the error page, you click on "view source" (I mean the browser feature)?

________________________________________________________
Eugenio |\.-./| DaDaBIK developer and project admin
Re: PDF EXPORT ERROR
September 14, 2018 12:37AM
You can hide file paths for security reason if you want.

________________________________________________________
Eugenio |\.-./| DaDaBIK developer and project admin
Re: PDF EXPORT ERROR
September 14, 2018 12:47AM
Re: PDF EXPORT ERROR
September 14, 2018 12:53AM
For the content of the "view source", I need that you paste here the actual content (text), including everything (blank spaces, blank lines) to check if there is any weird character.

________________________________________________________
Eugenio |\.-./| DaDaBIK developer and project admin
Re: PDF EXPORT ERROR
September 14, 2018 12:58AM
BEFORE CLICKING ON PRODUCE PDF BUTTON



<!DOCTYPE html>
<!--[if lte IE 9]>
<html class="lte-ie9"<![endif]-->
<!--[if gt IE 9]><!-->
<html

><!--<![endif]-->
<head>
<title>DaDaBIK database front-end - dadabik.com</title>
<link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">
<link rel="stylesheet" href="css/styles_screen.css" type="text/css">

<!--<link rel="stylesheet" href="css/styles_screen.css?c=842" type="text/css" media="print">
<link rel="stylesheet" href="css/styles_print.css" type="text/css" media="print">-->


<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="Generator" content="DaDaBIK 9.1 Monterosso - http://dadabik.com/">;
<meta name="viewport" content="initial-scale=1.0"/>
<script language="javascript" type="text/javascript" src="include/tinymce/tinymce.min.js"></script>

<script src="include/jquery/jquery-1.9.1.min.js"></script>

<script src="include/jquery/jquery-ui-1.12.1/jquery-ui.min.js"></script>
<link rel="stylesheet" href="include/jquery/jquery-ui-1.12.1/jquery-ui.min.css" type="text/css" media="screen">
<!--
<script src="include/date_picker/jquery-ui-1.10.1.custom.min.js"></script>
<link rel="stylesheet" href="css/jquery-ui-1.10.1.custom.min.css" type="text/css" media="screen">
-->
<script src="include/date_picker/jquery-ui-timepicker-addon.js"></script>
<link rel="stylesheet" href="css/jquery-ui-timepicker-addon.css" type="text/css" media="screen">


<link rel="stylesheet" href="css/fontawesome.css">
<link rel="stylesheet" href="css/bootstrap.css">

<!-- chosen -->
<!--<link rel="stylesheet" href="css/chosen/chosen.css">
<script src="include/chosen/chosen.jquery.min.js" type="text/javascript"></script>-->

<!-- select2 -->
<link href="css/select2/select2.min.css" rel="stylesheet" />
<script src="include/select2/select2.min.js"></script>




<link rel="stylesheet" href="css/styles_screen_custom.css" type="text/css" media="screen">

<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "specific_textareas",
editor_selector : "rich_editor",
branding: false,
plugins: [
"advlist autolink lists link image charmap print preview anchor",
"searchreplace visualblocks code fullscreen",
"insertdatetime media table contextmenu paste"
]
});
</script>



<script src="include/custom_functions.js"></script>


<script>
function uncheck_other_homepage_checkboxes(index){

if ( $("#is_homepage_static_page_"+index).is(':checked') === true ){
for (i=1;i<=Number($("#number_items").val());i++){
if ( i != index){
$("#is_homepage_static_page_"+i).prop('checked', false);
}
}
}
}
function enable_disable_loader(action)
{
if (action === 'enable'){
$("body").addClass("loading");
}
else if(action === 'disable'){
$("body").removeClass("loading");
}
}

function remove_showing_confirmation_message_class()
{
$("body").removeClass("showing_confirmation_message");
}


$(document).ready(function() {


$(function () {
$('li.has-sub-menu > a').on("click", function (e) {
e.preventDefault();
var $listItem = $(this).parents("li:first");
$listItem.toggleClass("sub-menu-opened");
$listItem.toggleClass("selected");
});

$('[data-mobile-menu-toggle]').on("click", function () {
$('.main-menu-container').toggleClass("menu-mobile-opened");
});
});


//$("#menu").eosMenu();

//$( ".eos-item-selected" ).css('display', 'none');


$('#confirmation_message_container').on('click', '#error_message_close_link', function (e) {
$("#error_message").css('display', 'none');
e.preventDefault()
});
$('#confirmation_message_container').on('click', '#confirmation_message_close_link', function (e) {
$("#confirmation_message").css('display', 'none');
e.preventDefault()
});
$('#confirmation_message_container').on('click', '#alert_message_close_link', function (e) {
$("#alert_message").css('display', 'none');
e.preventDefault()
});

// adjust diabled attribute for template_table when the page is loaded
if ($('#enable_template_table_checkbox').is(':checked')){
$('#template_table').prop('disabled', false);
}
else{
$('#template_table').prop('disabled', true);

}

// adjust it again when the user click on the enable checkbox
$("#enable_template_table_checkbox").click(function(e) {

if ($('#enable_template_table_checkbox').is(':checked')){
$('#template_table').prop('disabled', false);
}
else{
$('#template_table').prop('disabled', true);

}
});

/*$("#date_function").on('change', function() {
alert(0);
show_hide_date_functions_select();
});*/


$("#craete_new_view_link").click(function(e) {

if ($("#create_new_view_form").css('display') === 'block'){
$("#create_new_view_form").css('display', 'none');
}
else{
$("#create_new_view_form").css('display', 'block');

}
e.preventDefault();
});


$("#include_tables_form").submit(function(e) {


var field_names_to_update = [];
var field_values_to_update = [];
var where_values = [];

enable_disable_loader('enable');

var number_items = $('#number_items').val();

var pages_to_show = $('#pages_to_show').val()

var error = '';

if (pages_to_show === 'custom_pages'){

var tablename_to_update = 'dadabik_static_pages';

for (i=0;i<number_items;i++){
field_names_to_update = [];
field_values_to_update = [];
field_names_to_update[0] = 'link_static_page';
field_values_to_update[0] = $('#link_static_page_'+(i+1)).val();

field_names_to_update[1] = 'enabled_static_page';
if ($('#enabled_static_page_'+(i+1)).is(':checked')){
field_values_to_update[1] = '1';
}
else{
field_values_to_update[1] = '0';
}

field_names_to_update[2] = 'file_static_page';
field_values_to_update[2] = $('#file_static_page_'+(i+1)).val();

field_names_to_update[3] = 'content_static_page';
field_values_to_update[3] = tinyMCE.get('content_static_page_'+(i+1)).getContent();

field_names_to_update[4] = 'menu_parent_page';
field_values_to_update[4] = $('#menu_parent_page_'+(i+1)).val();

field_names_to_update[5] = 'is_homepage_static_page';

if ($('#is_homepage_static_page_'+(i+1)).is(':checked')){
field_values_to_update[5] = 'y';
}
else{
field_values_to_update[5] = 'n';
}

field_names_to_update[6] = 'type_static_page';
field_values_to_update[6] = $('#type_static_page_'+(i+1)).val();

field_names_to_update[7] = 'menu_order_static_page';
field_values_to_update[7] = $('#menu_order_static_page_'+(i+1)).val();

field_names_to_update[8] = 'href_link_static_page';
field_values_to_update[8] = $('#href_link_static_page_'+(i+1)).val();

field_names_to_update[9] = 'separator_before_static_page';
if ($('#separator_before_static_page_'+(i+1)).is(':checked')){
field_values_to_update[9] = 'y';
}
else{
field_values_to_update[9] = 'n';
}



if (field_values_to_update[6] === 'PHP' && field_values_to_update[2] === '') {
error = 'If you choose PHP as <i>type</i>, you need to specify a PHP source file as well.';
break;
}
else if (field_values_to_update[6] === 'html' && field_values_to_update[3] === '') {
error = 'If you choose HTML as <i>type</i>, you need to specify the HTML content as well.';
break;
}
else if (field_values_to_update[6] === 'link' && field_values_to_update[8] === '') {
error = 'If you choose link as <i>type</i>, you need to specify the href link as well.';
break;
}






where_values = $('#id_static_page_'+(i+1)).val();
}
}
else{
var tablename_to_update = 'dadabik_table_list';

for (i=0;i<number_items;i++){
field_names_to_update = [];
field_values_to_update = [];
field_names_to_update[0] = 'alias_table';
field_values_to_update[0] = $('#alias_table_'+(i+1)).val();

field_names_to_update[1] = 'pk_field_table';
field_values_to_update[1] = $('#pk_field_table_'+(i+1)).val();

field_names_to_update[2] = 'menu_parent_table';
field_values_to_update[2] = $('#menu_parent_table_'+(i+1)).val();

field_names_to_update[3] = 'allowed_table';

if ($('#allowed_table_'+(i+1)).is(':checked')){
field_values_to_update[3] = '1';
}
else{
field_values_to_update[3] = '0';
}

field_names_to_update[4] = 'menu_order_table';
field_values_to_update[4] = $('#menu_order_table_'+(i+1)).val();

field_names_to_update[5] = 'separator_before_table';
if ($('#separator_before_table_'+(i+1)).is(':checked')){
field_values_to_update[5] = 'y';
}
else{
field_values_to_update[5] = 'n';
}

where_values = $('#name_table_'+(i+1)).val();
}
}
if (error !== ''){
window.scrollTo(0,0);
$('#confirmation_message_container').html('<div class="msg_error" id="error_message"><p>'+error+'<br/><br/><a href="javascript:{}" id="error_message_close_link">Ok, close</a></p></div>');
enable_disable_loader('disable');
}
else{
$('#confirmation_message_container').html('');
$.ajax({
url: "api.php?function=update_records",

data: ({
where_values: where_values,
field_names_to_update: field_names_to_update,
field_values_to_update: field_values_to_update,
tablename_to_update : tablename_to_update,

} ),

type: "POST",
dataType: "json",
success: function(data){

enable_disable_loader('disable');

if (data.status === 'ok'){
if (data.result !== 'done'){
alert('unexpected error include_tables_form.submit - ' + data.result+ ' - '+data.error_message);
}
else{
$("body").addClass("showing_confirmation_message");
window.setTimeout( remove_showing_confirmation_message_class, 1000);
}
}
else{
alert('unexpected error include_tables_form.submit status not OK');
}
},
error: function(data, status, e){
enable_disable_loader('disable');
alert('unexpected error include_tables_form.submit ajax error'+JSON.stringify(data));
}
});
}

e.preventDefault(); // avoid to execute the actual submit of the form.
});


// modreq
// fine modreq


$('input[id^="date_picker"]').datepicker({
yearRange: '2008:2028',
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true
});

$('input[id^="date_time_picker"]').datetimepicker({
dateFormat: 'yy-mm-dd',
yearRange: '2008:2028',
changeMonth: true,
changeYear: true,
showSecond: true,
timeFormat: 'HH:mm:ss'
});



});
</script>

<script language="Javascript">
function show_admin_help_old(title, content)
{
if (document.all) {
topoffset=document.body.scrollTop;
leftoffset=document.body.scrollLeft;
WIDTH=document.body.clientWidth;
HEIGHT=document.body.clientHeight;
} else {
topoffset=pageYOffset;
leftoffset=pageXOffset;
WIDTH=window.innerWidth;
HEIGHT=window.innerHeight;
}

newtop=((HEIGHT-200)/2)+topoffset;

if (document.all) {
newleft=150;
} else {
newleft=((WIDTH-400)/2)+leftoffset;
}

document.getElementById('div_help').style.left=newleft;
document.getElementById('div_help').style.top=newtop;

document.getElementById('div_help_content_title').innerHTML = '<div align="right""><a href="javascript:hide_help();" style="text-decoration:none;color:#ff7700">[X]&nbsp;&nbsp;&nbsp;</a></div>'+title;
document.getElementById('div_help_content_text').innerHTML = content;
document.getElementById('div_help').style.display = 'block';
}


function show_admin_help(title, content)
{
document.getElementById('dialog').innerHTML = content;


$( "#dialog" ).dialog({
width: 500,
modal: true
});

$('#dialog').dialog('option', 'title', title);
}


function hide_help()
{
document.getElementById('div_help').style.display = 'none';
document.getElementById('div_help_content_title').innerHTML = "";
document.getElementById('div_help_content_text').innerHTML = "";
}

function show_frontend_help(title, content)
{
if (document.all) {
topoffset=document.body.scrollTop;
leftoffset=document.body.scrollLeft;
WIDTH=document.body.clientWidth;
HEIGHT=document.body.clientHeight;
} else {
topoffset=pageYOffset;
leftoffset=pageXOffset;
WIDTH=window.innerWidth;
HEIGHT=window.innerHeight;
}

newtop=((HEIGHT-200)/2)+topoffset;

if (document.all) {
newleft=150;
} else {
newleft=((WIDTH-400)/2)+leftoffset;
}

document.getElementById('div_help_frontend').style.left=newleft;
document.getElementById('div_help_frontend').style.top=newtop;

document.getElementById('div_help_frontend_content_title').innerHTML = '<div align="right""><a href="javascript:hide_frontend_help();" style="text-decoration:none;color:#ff7700">[X]&nbsp;&nbsp;&nbsp;</a></div>'+title;
document.getElementById('div_help_frontend_content_text').innerHTML = content;
document.getElementById('div_help_frontend').style.display = 'block';
}

function hide_frontend_help()
{
document.getElementById('div_help_frontend').style.display = 'none';
document.getElementById('div_help_frontend_content_title').innerHTML = "";
document.getElementById('div_help_frontend_content_text').innerHTML = "";
}

function show_template_instructions(title)
{
$("#dialog").load('include/forms/template_help_content.html').dialog({ width: 500,modal:true});
$('#dialog').dialog('option', 'title', title);
}

/*
function show_template_instructions_old(title)
{
if (document.all) {
topoffset=document.body.scrollTop;
leftoffset=document.body.scrollLeft;
WIDTH=document.body.clientWidth;
HEIGHT=document.body.clientHeight;
} else {
topoffset=pageYOffset;
leftoffset=pageXOffset;
WIDTH=window.innerWidth;
HEIGHT=window.innerHeight;
}

newtop=((HEIGHT-200)/2)+topoffset;

if (document.all) {
newleft=150;
} else {
newleft=((WIDTH-400)/2)+leftoffset;
}

document.getElementById('div_template_instructions').style.left=newleft;
document.getElementById('div_template_instructions').style.top=newtop;

document.getElementById('div_template_instructions_content_title').innerHTML = '<div align="right"><a href="javascript:hide_template_instructions();" style="text-decoration:none;color:#ff7700">[X]&nbsp;&nbsp;&nbsp;</a></div>'+title;
document.getElementById('div_template_instructions_content_text').style.display = 'block';
document.getElementById('div_template_instructions').style.display = 'block';
}

function hide_template_instructions_old()
{
document.getElementById('div_template_instructions').style.display = 'none';
//document.getElementById('div_template_instructions_content_title').innerHTML = "";
//document.getElementById('div_template_instructions_content_text').innerHTML = "";
}
*/

function show_hide_date_functions_select(){

var type=$('option:selected', $('#group_by_field')).attr('field_type');


if ( type == 'date' || type == 'date_time' || type == 'update_date_time' || type == 'insert_date_time'){
$('#date_functions_container').css('display', 'inline-block');
}
else {
$('#date_functions_container').css('display', 'none')
};

}


</script>



<script language="Javascript">
//opens a js popup with customizable options. Popup will close and open
//again upon call from pwd-generator link
var mywindow;
function generic_js_popup(url,name,w,h){
if (mywindow!=null && !mywindow.closed){
mywindow.close();
}
var options;
options = "resizable=yes,toolbar=0,status=1,menubar=0,scrollbars=yes, width=" + w + ",height=" + h + ",left="+(screen.width-w)/2+",top="+(screen.height-h)/6;
mywindow = window.open(url,name,options);
mywindow.focus();
}

function enable_disable_input_box_insert_edit_form(null_checkbox_prefix, year_field_suffix, month_field_suffix, day_field_suffix, hours_field_suffix, minutes_field_suffix, seconds_field_suffix)
// goal: set the status (disabled|enabled) of each input element of the insert|edit form, depending on the status (checked|not checked) of the corresponding null value checkbox (if it exists)
// input: null_checkbox_prefix, year_field_suffix, month_field_suffix, day_field_suffix
{
var count = document.getElementById('dadabik_main_form').length;
var null_checkbox_prefix_length = null_checkbox_prefix.length;

// for each element of the form
for (i=0;i<count;i++)
{
// if the element is a null value checkbox element
if (document.getElementById('dadabik_main_form').elements.name.substr(0,null_checkbox_prefix_length) == null_checkbox_prefix && document.getElementById('dadabik_main_form').elements.disabled === false){

// check if the field is a datetime field type

var hours_field_name = document.getElementById('dadabik_main_form').elements.name.substr(null_checkbox_prefix_length) + hours_field_suffix;

var b = new Array;
b = document.getElementsByName(hours_field_name);

// check if the field is a date field type

var year_field_name = document.getElementById('dadabik_main_form').elements.name.substr(null_checkbox_prefix_length) + year_field_suffix;

var a = new Array;
a = document.getElementsByName(year_field_name);

var field_type_is_date = 0;
var field_type_is_date_time = 0;


if (b[0]){ // if the relative hours field exists
field_type_is_date_time = 1;
} // end if
else if (a[0]){ // if the relative year field exists
field_type_is_date = 1;
} // end if


if (field_type_is_date == 1 || field_type_is_date_time == 1){
// get the name of the relative input controls

var month_field_name = document.getElementById('dadabik_main_form').elements.name.substr(null_checkbox_prefix_length) + month_field_suffix;

var day_field_name = document.getElementById('dadabik_main_form').elements.name.substr(null_checkbox_prefix_length) + day_field_suffix;

if (field_type_is_date_time == 1){

var minutes_field_name = document.getElementById('dadabik_main_form').elements.name.substr(null_checkbox_prefix_length) + minutes_field_suffix;

var seconds_field_name = document.getElementById('dadabik_main_form').elements.name.substr(null_checkbox_prefix_length) + seconds_field_suffix;
}

// and set the relative input controls enabled/disabled depending on the null value checkbox status (checked|not checked)
var a = new Array;
a = document.getElementsByName(year_field_name);

var b = new Array;
b = document.getElementsByName(month_field_name);

var c = new Array;
c = document.getElementsByName(day_field_name);

if (field_type_is_date_time == 1){

var d = new Array;
d = document.getElementsByName(hours_field_name);

var e = new Array;
e = document.getElementsByName(minutes_field_name);

var f = new Array;
f = document.getElementsByName(seconds_field_name);

}


if (document.getElementById('dadabik_main_form').elements.checked == true){
a[0].disabled = true;
b[0].disabled = true;
c[0].disabled = true;

if (field_type_is_date_time == 1){

d[0].disabled = true;
e[0].disabled = true;
f[0].disabled = true;

}


} // end if
else{
a[0].disabled = false;
b[0].disabled = false;
c[0].disabled = false;

if (field_type_is_date_time == 1){
d[0].disabled = false;
e[0].disabled = false;
f[0].disabled = false;

}

} // end else
} // end if
else {
// get the name of the relative input control
var field_name = document.getElementById('dadabik_main_form').elements.name.substr(null_checkbox_prefix_length);

// and set the relative input control enabled/disabled depending on the null value checkbox status (checked|not checked)
var a = new Array;
a = document.getElementsByName(field_name);

if (document.getElementById('dadabik_main_form').elements.checked == true){
a[0].disabled = true;
} // end if
else{
a[0].disabled = false;
} // end else
} // end else
} // end if
} // end for
} // end function



function enable_disable_input_box_search_form(field_name, select_type_select_suffix, year_field_suffix, month_field_suffix, day_field_suffix, hours_field_suffix, minutes_field_suffix, seconds_field_suffix)
// goal: set the status (disabled|enabled) of an input element of the search form, depending on the status of the corresponding select_type_select field
// input: field_name, select_type_select_suffix, year_field_suffix, month_field_suffix, day_field_suffix
{

// check if the field is a date field type

var year_field_name = field_name + year_field_suffix;
var hours_field_name = field_name + hours_field_suffix;

// check if the field is a datetime field type

var b = new Array;
b = document.getElementsByName(hours_field_name);

// check if the field is a date field type

var a = new Array;
a = document.getElementsByName(year_field_name);

var field_type_is_date = 0;
var field_type_is_date_time = 0;


if (b[0]){ // if the relative hours field exists
field_type_is_date_time = 1;
} // end if
else if (a[0]){ // if the relative year field exists
field_type_is_date = 1;
} // end if


if (field_type_is_date == 1 || field_type_is_date_time == 1){
// get the name of the relative input controls

var month_field_name = field_name + month_field_suffix;

var day_field_name = field_name + day_field_suffix;

if (field_type_is_date_time == 1){

var minutes_field_name = field_name + minutes_field_suffix;

var seconds_field_name = field_name + seconds_field_suffix;
}

// and set the relative input controls enabled/disabled depending on the null value checkbox status (checked|not checked)
var a = new Array;
a = document.getElementsByName(year_field_name);

var b = new Array;
b = document.getElementsByName(month_field_name);

var c = new Array;
c = document.getElementsByName(day_field_name);



if (field_type_is_date_time == 1){

var d = new Array;
d = document.getElementsByName(hours_field_name);

var e = new Array;
e = document.getElementsByName(minutes_field_name);

var f = new Array;
f = document.getElementsByName(seconds_field_name);

}

var g = new Array;
g = document.getElementsByName(field_name+select_type_select_suffix);

if (g[0].value == 'is_null'){
a[0].disabled = true;
b[0].disabled = true;
c[0].disabled = true;

if (field_type_is_date_time == 1){

d[0].disabled = true;
e[0].disabled = true;
f[0].disabled = true;

}
} // end if
else{
a[0].disabled = false;
b[0].disabled = false;
c[0].disabled = false;

if (field_type_is_date_time == 1){

d[0].disabled = false;
e[0].disabled = false;
f[0].disabled = false;

}
} // end else
} // end if
else{
// set the relative input control enabled/disabled depending on the null value checkbox status (checked|not checked)
var a = new Array;
a = document.getElementsByName(field_name);

var b = new Array;
b = document.getElementsByName(field_name+select_type_select_suffix);

if (b[0].value == 'is_null' || b[0].value == 'is_empty' || b[0].value == 'is_not_null' || b[0].value == 'is_not_empty'){
a[0].disabled = true;
} // end if
else{
a[0].disabled = false;
} // end else
} // end else

} // end function

function getRadioValue(theRadioGroup)
{
var elements = document.getElementsByName(theRadioGroup);
for (var i = 0, l = elements.length; i < l; i++)
{
if (elements.checked)
{
return elements.value;
}
}
}

function show_hide_text_other(field_type)
// goal: show/hide the textbox close to select_single fields according to the "other" field selected or not
{

var other_textbox_div_suffix = '_other____';

var count = document.getElementById('dadabik_main_form').length;
var other_textbox_div_suffix_length = other_textbox_div_suffix.length;

// for each element of the form
for (i=0;i<count;i++)
{


var field_name_length = document.getElementById('dadabik_main_form').elements.name.length;



// if the field is a other text field
if (document.getElementById('dadabik_main_form').elements.name.substr(field_name_length-other_textbox_div_suffix_length) == other_textbox_div_suffix){


// get the name of the relative input control
var field_name = document.getElementById('dadabik_main_form').elements.name.substr(0, field_name_length-other_textbox_div_suffix_length);


// and set the relative input control enabled/disabled depending on the null value checkbox status (checked|not checked)
var a = new Array;
a = document.getElementsByName(field_name);

var div_name = 'other_textbox_'+field_name;

if (field_type == 'select_single'){
var value_to_check = a[0].value;
}
else if(field_type === 'select_single_radio'){
var value_to_check = getRadioValue(field_name);
}

if (value_to_check == '......'){

//document.getElementById(div_name).style.visibility = 'visible';
document.getElementById(div_name).style.display = 'block';
} // end if
else{

//document.getElementById(div_name).style.visibility = 'hidden';
document.getElementById(div_name).style.display = 'none';
}

} // end if

} // end for
} // end function

function execute_custom_function(url)
{
enable_disable_loader('enable');

$.ajax({
url: url,

data: ({}),

type: "POST",
dataType: "json",
success: function(data){

enable_disable_loader('disable');

if (data.status === 'ok'){
$("body").addClass("showing_confirmation_message");
window.setTimeout( remove_showing_confirmation_message_class, 1000);
}
else{
alert('unexpected error custom function ajax status not OK');
}
},
error: function(data, status, e){
enable_disable_loader('disable');
alert('unexpected error custom function ajax call: '+JSON.stringify(data));
}
});
}

</script>

</head>

<body



>

<div id="dialog" title=""></div>

<div id="div_help" style="width: 600px">
<div id="div_help_content">
<div id="div_help_content_title"></div>
<div id="div_help_content_text"></div>
</div>
</div>

<div id="div_help_frontend" style="width: 600px;z-index: 1">
<div id="div_help_frontend_content">
<div id="div_help_frontend_content_title"></div>
<div id="div_help_frontend_content_text"></div>
</div>
</div>
<div class="fixed-header">
<div class="row">
<div class="col-xs-8">
<!--<img class="logo img-responsive" src="images/logo_alpha.png">-->



</div>

<div class="col-xs-4 right">
<a href="#" data-mobile-menu-toggle>
<i class="fa fa-bars fa-2x"></i>
</a>
</div>
</div>
</div>

<div class="fixed-footer">



<a href="index.php?function=edit_account" class="btn btn-primary" title="Your account"><i class="fa fa-user"></i> Your account</a>

<a href="login.php?function=logout" title="Logout" class="btn btn-danger"><i class="fa fa-sign-out"></i> Logout</a>


</div>


<table class="main_table">
<tr>
<td class="main_table_td">
<!--<h1 class="onlyscreen" align="center">DaDaBIK</h1>-->


<table class="table_interface_container" align="center">

<tr class="table_interface_container_tr_logo"><td><img style="max-width: 100%;height: auto;" src="images/logo.png"><div class="app-info pull-right text-center"><div class="user-info"><strong>User:</strong> drashrafsabry@gmail.com <br> <a href="index.php?function=edit_account" class="btn btn-xs btn-primary" title="Your account"><i class="fa fa-user" aria-hidden="true"></i> Your account</a> <a class="btn btn-xs btn-danger" href="login.php?function=logout" title="Logout"><i class="fa fa-sign-out" aria-hidden="true"></i> Logout</a><br></div><a href="admin.php?tablename=pregnancy" class="btn btn-xs btn-primary btn-block"><i class="fa fa-edit"></i>EDIT this App</a></div>
</td>
</tr>


<tr class="table_interface_container_tr_top_menu" >
<td>
<!--[if !lte IE 9]><!-->
<table class="table_interface_container_table_top_menu" >
<!--<![endif]-->

<!--[if lte IE 9]>
<table class="table_interface_container_table_top_menu_ie9">
<![endif]-->

<tr>

<!--<td><a href="#" class="fa fa-bars fa-lg eos-pull-right" aria-hidden="true"></a></td>-->







</td>
<td style="width:100%">
</td>




</tr>
</table>

</td>
</tr>















<tr>
<td class="table_interface_container_td_content">
<table class="table_interface_container_table_content"><tr>
<td class="td_left_menu"><div class="main-menu-container"><ul class="main-menu"><li><a href="index.php?function=show_static_page&id_static_page=1">Patient List</a></li><li class="has-sub-menu"><a href="#"><i class="menu-icon-collapsed pull-right fa fa-caret-right"></i><i class="menu-icon-open pull-right fa fa-caret-down"></i>Patients</a><ul class="sub-menu"><li><a href="index.php?function=search&tablename=patients">Patients</a></li><li><a href="index.php?function=search&tablename=visits">Visits</a></li><li><a href="index.php?function=search&tablename=ComingDelivery">Deliveries</a></li></ul></li><li class="is-separator"></li><li class="has-sub-menu"><a href="#"><i class="menu-icon-collapsed pull-right fa fa-caret-right"></i><i class="menu-icon-open pull-right fa fa-caret-down"></i>More</a><ul class="sub-menu"><li><a href="index.php?function=search&tablename=certifcatetemplate">Certificates Templates</a></li><li><a href="index.php?function=search&tablename=Requests_Labs">Requests Labs</a></li><li><a href="index.php?function=search&tablename=Requests_Categories">Requests Categories</a></li><li><a href="index.php?function=search&tablename=Requests_Names">Requests Names</a></li><li><a href="index.php?function=search&tablename=Treatment_Names">Treatment Names</a></li></ul></li><li><a href="index.php?function=search&tablename=Reports">Reports</a></li><li class="has-sub-menu"><a href="#"><i class="menu-icon-collapsed pull-right fa fa-caret-right"></i><i class="menu-icon-open pull-right fa fa-caret-down"></i>Admin</a><ul class="sub-menu"><li><a href="index.php?function=search&tablename=dadabik_users">users</a></li><li><a href="index.php?function=search&tablename=dadabik_groups">groups</a></li></ul></li></ul></div></td><td class="td_content" valign="top">
<p><h1>Pregnancies</b></h1><p><span class="subtitle">Details of the item</span> <span class="form_fields_set"><div class="form_row"><label class="detail_page_label" for="ID">ID</label>&nbsp;&nbsp;&nbsp;<span class="form_input_element">Rania Samy Aziz رانيا سامي عزيز</span><span class="form_input_element_button"></span></div><div class="form_row"><label class="detail_page_label" for="LMP">LMP</label>&nbsp;&nbsp;&nbsp;<span class="form_input_element"></span><span class="form_input_element_button"></span></div><div class="form_row"><label class="detail_page_label" for="EDD">EDD</label>&nbsp;&nbsp;&nbsp;<span class="form_input_element"></span><span class="form_input_element_button"></span></div><div class="form_row"><label class="detail_page_label" for="Notes">Notes</label>&nbsp;&nbsp;&nbsp;<span class="form_input_element"></span><span class="form_input_element_button"></span></div></span><br/><br/><form target="_blank" class="css_form" method="POST" action="index.php?tablename=pregnancy&function=details&export_to_pdf=1&where_field=id_pregnancy&where_value=3436"><input type="button" class="button_form go_back" value="Go back" onclick="javascript:document.location='index.php?tablename=patients&function=edit&where_field=ID&where_value=16'">&nbsp;<input type="button" class="button_form" value="Edit" onclick="javascript:document.location='index.php?function=edit&tablename=pregnancy&where_field=id_pregnancy&where_value=3436&master_table_name=patients&master_table_function=edit&master_table_where_field=ID&master_table_where_value=16&is_items_table=1'">&nbsp;<input type="button" class="button_form" value="PDF" id="pdf_button_2" onclick=" document.getElementById('pdf_template_2').style.visibility = 'visible';document.getElementById('pdf_button_2').style.display = 'none'; document.getElementById('produce_pdf_button_2').style.visibility = 'visible';"><select name="pdf_template" id="pdf_template_2" style="visibility:hidden;display:inline-block;"><option value="" disabled selected>Choose PDF template</option><option value="">No PDF template</option><option value="report_prenatal copy1">report_prenatal copy1</option></select> <input type="submit" id="produce_pdf_button_2" value="Produce PDF" style="visibility:hidden;display:inline-block;"></form>
<br>
<br><br></td>
</tr>
</table>

</td>
</tr>
</table>




<br><br>
<div class="powered_by_dadabik" align="right">Powered by: <a href="https://dadabik.com/low-code-platform-features">DaDaBIK Low-code Development Platform</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/><br/></div>
</td>
</tr>
</table>
<div class="modal"></div>
<div class="confirmation_message"><h1>Done!</h1></div>






<script>

$(document).ready(function() {



});

</script>
</body>
</html>








AFTER IT GIVES THE ERROR

Confirm Form Resubmission
This webpage requires data that you entered earlier in order to be properly displayed. You can send this data again, but by doing so you will repeat any action this page previously performed.
Press the reload button to resubmit the data needed to load the page.
ERR_CACHE_MISS
Re: PDF EXPORT ERROR
September 14, 2018 06:33AM
What I need is the source of the page where you get the error, you probably have to confirm page submission. It is something like

ciao<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /...../dadabik_dev_/index.php:2541) in <b>/...../dadabik_dev_/include/tcpdf/tcpdf.php</b> on line <b>7645</b><br />
<strong>TCPDF ERROR: </strong>Some data has already been output to browser, can't send PDF file

Did it work in DaDaBIK 9? If yes, it is very strange because we haven't changed anything on this side.

________________________________________________________
Eugenio |\.-./| DaDaBIK developer and project admin



Edited 1 time(s). Last edit at 09/14/2018 06:33AM by eugenio.
Re: PDF EXPORT ERROR
September 14, 2018 10:03AM
it does not show what you mentioned
anyhow
i can send you a password if you wish to youur email , i am dont undertand technicals
Re: PDF EXPORT ERROR
September 15, 2018 03:30AM
pplease provide me with an email i can send you access codes , as i need to start working with the application
Re: PDF EXPORT ERROR
September 15, 2018 01:09PM
Yes, you can also send a support ticket to support@dadabik.org but what I am asking here is pretty straightforward:

1) Did it work with DaDaBIK 9?

2) You should, when you see the page with the error, click on "view source" and then, if the browser asks to confirm the re-submission of the page, reload the page. Just copy and paste what you see after having reloaded the page.

________________________________________________________
Eugenio |\.-./| DaDaBIK developer and project admin
Re: PDF EXPORT ERROR
September 16, 2018 12:45AM
<strong>TCPDF ERROR: </strong>Some data has already been output, can't send PDF file
Re: PDF EXPORT ERROR
September 16, 2018 12:50AM
email is sent to you
Re: PDF EXPORT ERROR
September 16, 2018 12:58AM
and no i didnt have dada 9 i jumped from 8.1 to 9,1
Sorry, only registered users may post in this forum.

Click here to login