Get result from a div and send it back into an ajax call
Hello,
I am struggling with this, I have 2 fields:
[CODE]
<div id="video_id"></div>//Results arrive here from first ajax call
In the "video_id" div there is a response from an ajax call(after an upload).
I need to take the text from that response and send it into another ajax call when the onchange is detected from the first ajax call.
Here is my code of the second ajax call:
Code:
<script>
$("#video_id").change(function() {
var id = $("#video_id").val();
console.log(id);
(
{
url: 'producer_save_video.php',
data: {id:id}
type: 'POST',
success: function (data) {
console.log('All good!');
}})
});
</script>
In the save_video_name.php I have my php code that is waiting for the name to be sent by post(and then recorded in mysql).
Any idea where is my error please?
Thank you,