I am very new to ajax with wordpress . Here i am getting a selected option value in var test
using bellow function when i alert it its showing a right value.
This var test
value i have to send using ajax and i want GET this value in PHP variable.
So what i required to call ajax and get script variable value of var test
in php in plugin file where i have both bellow function and select box.
JQuery Funtion.
jQuery("#time_slot").change(function()
{
var test= time_slot.value;
alert(test);
});
Select Box
<select name="time_slot" id="time_slot" class="time_slot">
<option value="">Choose a Time</option>
<option value="1:00 - 3:00">01:00 AM-03:00 AM</option>
<option value="3:00 - 5:00">03:00 AM-05:00 AM</option>
</select>