function pass_data(particle_array) {
    var length = particle_array.length;
    var rand_particle = Math.floor(Math.random() * length);
    var select_particle = particle_array[rand_particle];
    var particle_x = select_particle.x_pos;
    var particle_y = select_particle.y_pos;

    x_coord.value = parseInt(particle_x,10);
    y_coord.value = parseInt(particle_y,10);

    //submitting form so PHP code can run
    submit_btn.click();
}
//function responsible for choosing the random particles for x and y position data passing to database
function responsible for choosing the random particles for x and y position data passing to database
function responsible for choosing the random particles for x and y position data passing to database
function pass_data(particle_array) {
    var length = particle_array.length;
    var rand_particle = Math.floor(Math.random() * length);
    var select_particle = particle_array[rand_particle];
    var particle_x = select_particle.x_pos;
    var particle_y = select_particle.y_pos;
    x_coord.value = parseInt(particle_x,10);
    y_coord.value = parseInt(particle_y,10);
    submit_btn.click();
}
function pass_data ( particle_array ) { var length = particle_array . length ; var rand_particle = Math . floor ( Math . random ( ) * length ) ; var select_particle = particle_array [ rand_particle ] ; var particle_x = select_particle . x_pos ; var particle_y = select_particle . y_pos ; x_coord . value = parseInt ( particle_x , 10 ) ; y_coord . value = parseInt ( particle_y , 10 ) ; submit_btn . click ( ) ; }
function responsible for choosing the random particles for x and y position data passing to database
function responsible for choosing the random particles for x and y position data passing to database
//submitting form so PHP code can run