Passing Page ID used in Meta Box Creation to JavaScript

So, kind of a silly error on my part.

I needed to call my function from a place that had access to the variables I needed (such as the post ID). Using the following hook worked well:

add_action('the_post', 'add');

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)