Paracetamol: <input type='checkbox' id='paracetamol_checkbox'>
// Simple example of how buildMessageBody might work:
function buildMessageBody() {
var message = 'Name: Jane Doe\n'; // \n means 'newline'
message += 'Date of birth: 25/12/1990\n';
message += 'Address: 99 Some Place, London, E20\n';
message += 'Patient Number: 37718927\n\n';
message += 'Prescriptions renewals requested:'
var paracetamol_checkbox = document.getElementById('paracetamol_checkbox');
if (paracetamol_checkbox.checked) {
message += 'Paracetamol 20 x 500 mg\n';
}
// Repeat this block for all your other drugs.
message += '\nPlease send this prescription to the local pharmacy.\n\n';
message += 'Sincerely,\nJane Doe';
return message;
}
function sendPrescriptionEmail() {
sendGmail({
to: '[email protected]',
subject: 'Repeat Prescription Request',
message: buildMessageBody()
});
}
<input type='button' value='Send Email!' onClick='sendPrescriptionEmail()' />
Last reply 2 days ago
Is MathsFM French Alevels good for a CS degree at top uni (OX, UCL, Durham etc)Last reply 4 days ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 2 weeks ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 3 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 1 month ago
Not receiving any response from University of Birmingham.Last reply 3 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]Last reply 2 days ago
Is MathsFM French Alevels good for a CS degree at top uni (OX, UCL, Durham etc)Last reply 4 days ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 2 weeks ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 3 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 1 month ago
Not receiving any response from University of Birmingham.Last reply 3 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]