Nikolas.A Posted February 22, 2009 Share Posted February 22, 2009 I have the following code: <form action="" method="post" enctype="multipart/form-data" name="form_posting" id="form_posting" onSubmit="return checkFields(this)";> ...some fields here... <div id='ajaxDiv'></div> <div id='ajaxDiv2'></div> <div id='ajaxDiv3'></div> ...submit button... </form> here is an example of the ajax functions. <script language="javascript" type="text/javascript"> <!-- //Browser Support Code function ajaxFunction3(){ var ajaxRequest; // The variable that makes Ajax possible! try { // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e) { // Internet Explorer Browsers try { ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { // Something went wrong alert("Your browser broke!"); return false; } } } // Create a function that will receive data sent from the server ajaxRequest.onreadystatechange = function(){ if (ajaxRequest.readyState == 4) { var ajaxDisplay = document.getElementById('ajaxDiv3'); ajaxDisplay.innerHTML = ajaxRequest.responseText; } } var courier_type = document.getElementById('courier_type').value; var queryString3 = "?courier_type=" + courier_type; ajaxRequest.open("GET", "get_courier_input.php" + queryString3, true); ajaxRequest.send(null); } //--> </script> The fields that are inside the ajaxDivs are not available in the page that I process them. Any ideas? Link to comment https://forums.phpfreaks.com/topic/146358-submitting-a-form-which-includes-files-via-ajax-field-values-are-not-submitted/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.