Jump to content

div refresh by different id


dflow

Recommended Posts

how can i change the set refresh div to a posted id?

set div id="context" to id="$page_id"

$("#context").html(data);

 

<script type="text/javascript">
function addToFanPAge(page_id,page_access_token) {
var agree=confirm("Confirm add to page");
if (agree) {
	jQuery.ajax({
		url: "process-addpage.php",
		type: 'POST',			
		data: {page_id : page_id,page_access_token : page_access_token},	
		success: function(data){
			//document.location.reload(true);
			$("#context").html(data);

		}
	});
}
return false;	
}
</script>

Link to comment
https://forums.phpfreaks.com/topic/261091-div-refresh-by-different-id/
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.