jquery pass dynamic variable name
        Posted  
        
            by Alessandro
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Alessandro
        
        
        
        Published on 2010-06-07T07:36:50Z
        Indexed on 
            2010/06/07
            7:42 UTC
        
        
        Read the original article
        Hit count: 208
        
jQuery
hi
function liveUpdate(fld,value,id) {
    $.ajax({
      type: 'POST',
      url: 'myurl.html',
      data: { fld:value, 'id': id },
      success: function(data){//console.log(data);
      }
    });
    }
i want fld to be posted as fld's value not the variable name fld? i've tried to wrap around with eval but no luck
any ideas?
thanks
© Stack Overflow or respective owner