php - sending POST values javascript -



php - sending POST values javascript -

don't know why doesn't work....oh yeah, i'm newb still. have form posts info db, , works fine if utilize post. doesn't work if pass javascript function ajax , submit it. work w/ 'get' beingness submitted function, not work 'post'. 'post' connect db fine, values form blank db gets updated w/ new record has it's fields blank. here's fiddle, set php code css supposed go: http://jsfiddle.net/duckofdeath/6var7103/. here link page, feedback script gets sent tot page @ top: http://www.modernmediaworld.com/diaboli/register3.php function checkform(){

function checkform(){ if (window.xmlhttprequest) { // code ie7+, firefox, chrome, opera, safari xmlhttp=new xmlhttprequest(); } else { // code ie6, ie5 xmlhttp=new activexobject("microsoft.xmlhttp"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readystate==4 && xmlhttp.status==200) { document.getelementbyid("formfeedback").innerhtml=xmlhttp.responsetext; } } xmlhttp.open("post","addnewseeker.php",true); xmlhttp.send(); }

you posting info server, you're not sending anything. post designed send globs of info server. retrieving page. in situation setting contents of formfeedback whatever hear back. if that's want, stick , switch jquery $.ajax phone call (since tagged jquery ), makes much easier.

javascript php ajax

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -