See my code and please see what is my problem
$('#StartPiCam').click(function(){
$.ajax({
url: "StartPiCam",
type: "GET",
data: "value=1",
//dataType: "json",
//success: onDataReceived
});
$.ajax({
url: "PiCam_Brightness",
type: "GET",
data: "Brightness={$('#Brightness').val()}",
//dataType: "json",
//success: onDataReceived
});
});
<INPUT ID="Brightness" TYPE=TEXT NAME="Brightness" VALUE="50" SIZE=12 MAXLENGTH=3 NOFINSIDE="~! ~!" >
it returns 0 but I expect returning the value of the input "Brightness"
Changed the data format
This would work according to me.
$('#StartPiCam').click(function(){
$.ajax({
url: "StartPiCam",
type: "GET",
data: {value: '1'},
//dataType: "json",
//success: onDataReceived
});
$.ajax({
url: "PiCam_Brightness",
type: "GET",
data: {Brightness: $('#Brightness').val()}",
//dataType: "json",
//success: onDataReceived
});
});