Need to put dynamically generated (PHP) data into javascript -


i have simple jquery function, this:

$(foo).bar({    data:{       //here goes preformatted data database accessible php function    }, }); 

how do this? thanks, cheers!

try code, not coded. please, refer link further queries.

$(foo).bar({    data:{    $.ajax({      url: "complete_path.php",       success: function(result){      console.log(result); // process data per requirement.    }});   }, }); 

Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -