function submitSignupForm(form_name){ if(form_name==''||form_name==undefined)form_name='signupform'; var f = document.forms[form_name]; if(f.communitytype[0].checked){ f.action.value = 'quickReg'; } else if (f.communitytype[1].checked){ f.action.value = 'chooseCom'; } f.submit(); return; } function callAjax(url){$.ajax({url: url});} function setAjaxResponse(url,id){ if (document.getElementById(id)){ iHtml = document.getElementById(id).innerHTML.replace(/^[\s\r\n]+/,'').replace(/[\s\r\n]+$/,''); if (iHtml == ''){ $.ajax( { url: url , success: function(r) { //alert('geht an ' + id); $("#"+id).html(r); $("#"+id+"header").css("display","none"); if(r.replace(/^[\s\r\n]+/,'').replace(/[\s\r\n]+$/,'').length == 0) document.getElementById(id + 'space').style.display = 'none'; else document.getElementById(id + 'space').style.display = 'block'; } , error: function(){ $("#"+id).html(""); $("#"+id+"header").css("display","none"); } } ); } } } $(document).ready(function() { callAjax("portlets.phtml?update=1"); setAjaxResponse("portlets.phtml?pl=0","portlet0"); setAjaxResponse("portlets.phtml?pl=1","portlet1"); setAjaxResponse("portlets.phtml?pl=2","portlet2"); setAjaxResponse("portlets.phtml?pl=3","portlet3"); setAjaxResponse("portlets.phtml?pl=4","portlet4"); setAjaxResponse("portlets.phtml?pl=5","portlet5"); });