martenk
Goto Top

Problem mit php code im Java script

Hallo Gemeinschaft,

habe folgendes Problem im coding - wenn ich die session schliessen möchte komme ich nicht aus einer Endlosschleife raus

<script>

...
...
<?php if ($_SESSION['name'] =="Piet" or $_SESSION['name'] =="admin") {   ?>  
var td_date_element_delete_button = document.createElement('button');  
                                    td_date_element_delete_button.id_patient_treatment = pt_day[pt]['id_patient_treatment'];  
                                   td_date_element_delete_button.innerHTML="löschen";  
                                    td_date_element_delete_button.onclick=(function(){
                                       //alert(this.id_patient_treatment); 
                                       selectedPatientTreatmentDateCalendar = this.id_patient_treatment;
                                       $( "#removepatienttreatmentdatefromcalendar-dialog" ).dialog('open');  
                                       
                                    });
                                     //$( "button:first" ).button({ 
                                     $(td_date_element_delete_button).button({
                                        icons: {
                                            primary: "ui-icon-trash"  
                                        },
                                        text: false
                                    });
                                    td_date_element_delete_button.style='height: 19px; width:26px;';  
                                    //td_date_element.innerHTML += ' <button id_treatment="'+pt_day[pt]['id_patient_treatment']+'">löschen</button>'; 
                                    
                                    if(pt_day[pt]['color'] === null){  
                                        td_date_element.style="background-color: #fdff6d;";  
                                    }
                                    else{
                                        td_date_element.style="background-color: #"+pt_day[pt]['color']+";";  
                                    }
                                  td_date_element.appendChild(td_date_element_delete_button); 

<?php
}
?>

 

Content-Key: 7097001193

Url: https://administrator.de/contentid/7097001193

Printed on: July 21, 2024 at 23:07 o'clock