Hello, i load code with this function
function loadLoginbox(Target) { $(Target).load("index.php?m=login&c=loadLoginbox"); } function openLoginbox(Target) { loadLoginbox(Target); $.blockUI(Target, { width: '400px'}); } $(document).ready(function() { $.blockUI.defaults.pageMessage = "Bitte warten! Daten werden übertragen"; var Popupbox = $('#Popupbox')[0]; openLoginbox(Popupbox); $('#openLogoutbox').click(function() { $.blockUI(Popupbox, { width: '400px'}); }); $('#openLoginbox').click(function() { $.blockUI(Popupbox, { width: '400px'}); }); }); this is the loaded code <script type="text/javascript"> function checkLogin() { var Username = $("#LoginUsername").attr('value'); var Password = $("#LoginPassword").attr('value'); $.ajax({ url: 'index.php?m=login&c=checkLogin&Username='+Username+'&Password='+Password+'' }); $.unblockUI(); } $(document).ready(function() { $('#closeLoginbox').click(function() { alert('x'); $.unblockUI(); }); $('#startLogin').click(function() { checkLogin(); $.unblockUI(); //$.blockUI("<h1>Bitte warten! Anmeldedaten werden geprüft. hfg </h1>" ); }); }); </script> but the "$('#closeLoginbox').click(function() {" dosent start wgen i insert a onclick event in dthe html code all works fine. Why? ____________ Virus checked by G DATA AntiVirusKit Version: AVK 17.7335 from 03.09.2007 Virus news: www.antiviruslab.com