Hi @MITRADebarthaGECoreTechCyber-2843,
Since you app is flask app, you can add a requirements.txt to your root folder (if you haven't already) and run az webapp up -n surveyordemohtmlpage -g MyResource-Group --plan MyPlan -l westeurope
.
Using ajax, make sure you have the js library referenced, <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
and towards the bottom of your html add
$(document).ready(function() {
$('form').on('submit', function(event) {
$.ajax({
data : {
emailbody : $('#emailbody').val(),
subject: $('#subject').val(),
},
type : 'POST',
url : 'https://myflaskapp.azurewebsites.net/flaskfunction'
})
.done(function(data) {
Console.log(data);
});
event.preventDefault();
});
});
where /flaskfunction is
@app.route('/flaskfunction','POST')
def flaskfunction:
""" Process the request body """