Sorry for the basic question, just a bit confused as to what is going on here. I have some PHP running in Wordpress, I am able to run html, php and javascript all from within one file. For example:
<?php
//query WP for the tag
$wp_getTag = $wpdb->get_results(
"
SELECT name
FROM $wpdb->mydb_wor1.ukj_terms
INNER JOIN ukj_term_taxonomy
ON (
ukj_terms.term_id = ukj_term_taxonomy.term_id
)
WHERE ukj_term_taxonomy.taxonomy LIKE 'post_tag'
"
);
$json = json_encode($wp_getTag);
?>
<script type="text/javascript">
// pass the value to js
var JsonTags = <?php echo $json ?>;
</script>
So all the above works. I am grabbing some info from wp and then assigning it's value to a JS variable using echo. But it is not clear what is going on here? is the Javascript running on the server instead of the client?
echoed it to the final HTML page to send to your browser).