Hi,
I have loaded a form in an Ajax div, but now the simple submit doesn't work
Any tips/tutorials or good advice??
| SitePoint Sponsor |




Hi,
I have loaded a form in an Ajax div, but now the simple submit doesn't work
Any tips/tutorials or good advice??




tx pepejeria,
In fact I use firebug (might be useful for someone else)
At the moment i have a working ajax form but with the 'pesky' GET.
Still struggling to enable POST




hmm,
ok i think i am almost there.
I think i need to use
but what's the proper way to send the parametersCode:function makeRequestForm(url, parameters, layerName) { ....... http_request.open('POST', url, true); http_request.send(parameters); }
doesn't seems to work???Code:var queryString = "name=" + naam + "&job=" + job+ "&email=" + email; makeRequestForm("form.php", queryString, 'content');




ok I think I found a solution by adding
Code:http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http_request.setRequestHeader("Content-length", parameters.length); http_request.setRequestHeader("Connection", "close");




ok another little problem
I have add a captcha and now the form isn't working. I guess it has to do with $_SESSION
and the keycodeCode:if($_POST['Submit']) { if(($_SESSION['keycode'] == $_POST['check_code']) && (!empty($_SESSION['keycode'])) ) .... .....
Any advice on using $_SESSION + $_POST and httpRequest???Code:$keycode = keygen(6); $_SESSION['keycode'] = $keycode;
SOLVED
Last edited by D-flyer; Apr 7, 2007 at 04:11.
Bookmarks