Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82109

updating json with values after posting

$
0
0
Hi Allan,
After processing POST the following code is used to get json for updating select field in client side
if ( !isset($_POST['action']) ) {
	$out['schoolsList'] = $db
		->select( 'schools', 'id as value, school_name as label' )
		->fetchAll();
}	
	// Send it back to the client
echo json_encode( $out );

I am using this json like this
"fnInitComplete": function ( settings, json ) {
						editor.field('schools.id').update( json.schoolsList );					
					}
It works well initially, but even after changes made by editor and db values changed, the option values and json values does not reflect these changes. Until the whole page is reloaded.
Let me know your suggestion please.

Viewing all articles
Browse latest Browse all 82109

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>