gish Posted December 13, 2008 Share Posted December 13, 2008 hi I have a form that works great and I have an ajax script that works great but as soon as I place the form into the ajax script it keeps losings the post value I assuming i need to add something but I don't know what? the ajax openpage has the php code include("form.php"); this is the form echo "<form method='post'>"; echo "<input type=text name='form_value' value='' MaxLength='2' size='' style='text-align:center; width:150px; height:90px; border-color:white; font-family:arial, verdana:bold; font-size:80px' tabindex='0' >"; echo "<br>"; echo "<input type=submit value='' style='width:0px; height:0px; font-family:arial, verdana:bold; font-size:px' >"; echo "</form>"; function getNewXMLHttpRequest() { var findbrowser; try { findbrowser = new ActiveXObject('Microsoft.XMLHTTP'); } catch(a) { try { findbrowser = new XMLHttpRequest(); } catch (a) { findbrowser = false; } } return findbrowser; } function check1() { if (request.readyState ==4) { var randomDiv = document.getElementById("pictjs"); randomDiv.innerHTML = request.responseText; } } function ajaxselection(){ /// this is for the ajax request = new getNewXMLHttpRequest(); var url ="openpage.php"; request.open("GET", url, true); request.onreadystatechange = check1; request.send(false); } window.onload = menus; function menus(){ ajaxselection(); } Quote Link to comment https://forums.phpfreaks.com/topic/136795-ajax-form/ Share on other sites More sharing options...
Philip Posted December 16, 2008 Share Posted December 16, 2008 You mentioned it keeps losing the POST variable, but your script is running via the GET vars. What does the openpage.php look like? Quote Link to comment https://forums.phpfreaks.com/topic/136795-ajax-form/#findComment-716430 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.