Jump to content

help with load() POST


dflow

Recommended Posts

i need to refresh a div with hidden fields in a form that gets a value from a form field

 

//main page
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
  
  <input name="ID" type="text" onchange='ready("<?php echo $ID; ?>");' value="<?php echo $ID=44;?>" />

<script>
$(document).ready(function(ID) {
    
jQuery.ajax({
		url: "getPlaceids.php",
		type: 'POST',			
		data: {ID : ID},	
		success: function(msg){
			$('#mytarget').load( 'getPlaceids.php', { ID: ID });
		}
});
</script>
<div id="mytarget"></div>

//getPlaceids.php

 

<?php 
echo '<input name="ID" type="text" value="'.$_POST['$ID'].'" />';

?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/251888-help-with-load-post/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.