Bus seat booking system

How to access proximity sensor data to use it as variable in JS? What is the data type of proximity sensor data?

These two links might help you explore the things you are looking for:

https://www.w3.org/TR/proximity/

http://blog.teamtreehouse.com/exploring-javascript-device-apis

here is a link make a ajax request and get the data
http://www.w3schools.com/ajax/ajax_xmlhttprequest_send.asp

try the suggestion from here