function SubmitFaq(form, parent) { if (parent=="") parent = -1; thema = form.thema.value; name = form.name.value; text = form.text.value; if(thema == "") { alert('Bitte geben Sie ein gueltiges Thema ein.'); return; } if(name == "") { alert('Bitte geben Sie Ihren Namen an.'); return; } if(text == "") { alert('Bitte stellen Sie eine Frage.'); return; } url='faq.php?act=add&parent='+parent+'&thema='+thema+'&name='+name+'&text='+text; new Ajax.Request(url, { method: 'get', onSuccess: function(transport) { switchContent('faq.php'); } }); }