I'm having difficulty wrapping my head around this. I realize PHP is server side based and that jQuery is client side. So the problem lies with how to build that PHP on call, so it's ready to go when a jQuery action is called (I think).
I have an application where I click on a calender day and the selection box renders with options.
Here is my jQuery call:
<script>
var count = 0;
$(".addRow").click(function(){
var selector = $(this).data('num');
count++;
$("#tday_"+selector).append('<br/><br/><span>Additional Food choice: </span><select name='+selector+'>');
});
</script>
Problem is - how do I get the options for the select box? Is it possible to render a select box which I can retrieve from PHP in that append? Is it even possible to append to a DOM object FROM PHP, if that is the way to go?
This click does infact work and render an empty select box.
Thanks!