I am starting to learn javascript and I have a small project work complete. I would like to take the information from a form and create an ics file for 3 single events - an original date, a 5 day event, a 20 day event. Below is the entire html and javascript code. This will be an internal file, it won't go online.
So far i've been able to create the form and an alert box that pulls the information presented. I would like to keep it scrictly javascript and not jQuery - as that is beyond my skill level and comprehension.
Thank you so much friends. .
<form>
<fieldset>
<legend>NUMC Information</legend>
Handler: <select>
<option value = "Ronald" >Ronald</option>
<option value = "Thomas">Thomas</option>
<option value = "Elizabeth">Elizabeth</option>
</select>
</fieldset>
</form>
<br>
<fieldset>
<legend>FOIL Contact</legend>
<form>
First name:<br>
<input type="text" id="firstname">
<br>
Last name:<br>
<input type="text" id="lastname">
<br>
Email:<br>
<input type="email" id="email">
<br>
Phone:<br>
<input type="text" id="phone">
</form>
</fieldset>
<br>
<div class="origin-event" >Origin Event">
<form id="eventForm">
<fieldset>
<legend>New FOIL Calendar Event</legend>
<legend>FOIL Origin Date</legend>
<fieldset>
<div>
Title: <input type="text" id="summary" >
<br><br>
Origin Date: <input type="date" id = "originDate"/>
<br>
</div>
</fieldset>
<br>
<legend>FOIL 5 Day Reminder</legend>
<fieldset>
<div>
5 Day Reminder Date: <input type="date" id = "5dayDate"/>
<br>
</div>
</fieldset>
<br>
<legend>FOIL 20 Day Reminder</legend>
<fieldset>
<div>
20 Day Reminder Date: <input type="date" id = "20dayDate"/>
<br>
</fieldset>
<br>
Description:
<br>
<textarea id="description" name="description"></textarea>
<br>
Location:
<br>
<input value="New York" id="location">
</div>
</fieldset>
</form>
</div>
<br>
<div class = "buttons">
</div>
<div class="wrap">
<button type="button" onclick="getValue()">Create Origin Date Noficiation</button></a>
<br>
</div>
<script>
function getValue()
{
var title= "Title: " + document.getElementById("summary").value;
var description = "Description: " + document.getElementById("description").value;
var location = "Location: " + document.getElementById("location").value;
var originalDate = "Origin Date: " + document.getElementById( "originDate").value;
var FiveDay = "Five Day: " + document.getElementById( "5dayDate").value;
var TwentyDay = "Twenty Day: " + document.getElementById( "20dayDate").value;
alert(title + "\n" + description + "\n" + location + "\n" + originalDate + "\n" + FiveDay + "\n" + TwentyDay);
}
</script>