javascript - make data as per jquery ajax data method -


am doing doing, edit in place using jquery, if snippet complicated, refer easiest one,

'column2' => "rajangsfdgf" 'column3' => "srardhamgsdfgdf" 'column4' => "40043433" 'column7' => "23-01-2011 08:00:00" 'column5' => "400e" 'column6' => "1503" 

i want make somthing

 ( {column2 :"rajangsfdgf"},{column3 :"srardhamgsdfgdf"},{column4 :"40043433"},{column7 :"23-01-2011 08:00:00"},{column5 :"400e"},{column6 :"1503"}) 

some time values somthing also

'column2' => "rajangsfdgf" 'column4' => "40043433" 'column7' => "23-01-2011 08:00:00" 'column6' => "1503" 

then should form

( {column2 :"rajangsfdgf"},{column4 :"40043433"},{column7 :"23-01-2011 08:00:00"},{column6 :"1503"}) 

so somthing dynamic, ever , when ever program find column , equlent value, automatically form data somthing above,

am going give new data jquery ajax, that's y forming fomthing this,

var collection_of_updated_data = common.dump(o.changed); collection_of_updated_data = jquery.trim(collection_of_updated_data);   *****************here getting column1 , value******************   alert(collection_of_updated_data);      $.ajax({       url: "program_event_ajax_update.php",       global: false,       type: "post",       data: collection_of_updated_data,       datatype: "html",       async:false,       success: function(msg){          alert(msg);       }    } ) 

if understand want correctly, you'd take associative array , turn string representation.

json_encode() method that. there implementations both php , javascript (you mention you're using javascript, array syntax looks more php).

does right avenue? (or misinterpreting original question?)


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -