Jump to content

ajax form


gish

Recommended Posts

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();

}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.