Given that PHP is server-side, I have a question:
Within a php file, I have some HTML with a function declared like so:
<div class="img_div" ng-click="swipeUrl(variable)>
<!--data pulled from SQL server-->
</div>
Inside ng-click="swipeUrl(variable)"
there is a variable that I want to be dynamic. I could put '<?php .$param. ?>'
, but I wouldn't be able to change the PHP variable without AJAX, right?
Is it possible to put a javascript variable there that is dynamic (ie, fetch some data on a click and change this variable)? Maybe I could have an onClick function there, and then the script can be dynamic?
..or is the only way to make this work with an AJAX call?