I am trying to append this php
code using jquery. Is it possible?
I have
<script>
var myUrl = $("#categories").val();
$("<?php include('" + myUrl + "') ?>").appendTo( ".imgList" );
</script>
Is that the correct way of doing it? or is it just impossible? Any help is appreciated thanks.
Edit This is the code I am using to load the content.
var myUrl = $("#categories").val();
$( ".imgList" ).load(myUrl);
But it doesn't change when I change categories.
Edit2
<select id="categories" name="categories">
<option value="">Choose a category</option>
<option value="page1.html">Real Estate</option>
<option value="page2.html">Commercial Auto</option>
<option value="page3.html">Beauty/Salon</option>
<option value="4">Health</option>
<option value="5">Construction</option>
<option value="6">Legal</option>
<option value="7">Furniture</option>
<option value="8">Food</option>
</select><!-- end id="categories" -->