Commit a4963792 authored by Porter Libby's avatar Porter Libby
Browse files

href modifier for emails

parent cc36e61f
......@@ -213,7 +213,7 @@
<div class='block' id="block5">
<span class='section-prompt'>5. Done!</span>
<br>
<a href="mailto:no-one@snai1mai1.com?subject=look at this website&body=Hi,I found this website and thought you might like it http://www.geocities.com/wowhtml/">Send Email</a>
<a id='email_out' href=''>Send Email</a>
<div class='inner-nav'> <!-- Nav options for this block -->
......
var color_rotate = 0;
var color_arr = [
// GLOBALS
var email_href = "#";
var selection_tracking = ["","","",""];
var color_rotate = 0; // controls which color will be used first
var color_arr = [ // list of earlham approved colors for buttons
"#B9771E",
"#F9423A",
"#4A8096",
......@@ -13,6 +17,24 @@ function random_ec_color(){
}
return current_color;
}
function create_email_href(){
// create a HREF mailto link so that the selection can be sent as an email
if (selection_tracking[0] != "" && selection_tracking[1] != "" && selection_tracking[2] != "" && selection_tracking[3] != ""){
email_href = "mailto:example@example.com?subject=My EPIC Journey&body=";
email_href += "[NAME]%0D%0A%0D%0A";
email_href += "Official Earlham EPIC Journey Results: %0D%0A";
email_href += "1. Major Selection: " + selection_tracking[0] + "%0D%0A";
email_href += "2. Passion Project Selection: " + selection_tracking[1] + "%0D%0A";
email_href += "3. Access opportunities Selection: " + selection_tracking[2] + "%0D%0A";
email_href += "4. Explore Ways Forward: " + selection_tracking[3] + "%0D%0A";
var email_elem = document.getElementById('email_out');
email_elem.href = email_href;
}else{
console.log("selection incomplete");
}
}
......
......@@ -38,6 +38,7 @@ function section_two(val){ // load info for section two based on value
var desc = dictionary["passion_project"][val][1];
var title = dictionary["passion_project"][val][2];
var video = dictionary["passion_project"][val][3];
selection_tracking[1] = title; // set value for export
open_modal()
set_modal_text(url,desc,title,video)
}
......@@ -48,6 +49,7 @@ function section_three(val){ // load info for section three based on value
var desc = dictionary["access_opportunities"][val][1];
var title = dictionary["access_opportunities"][val][2];
var video = dictionary["access_opportunities"][val][3];
selection_tracking[2] = title; // set value for export
open_modal()
set_modal_text(url,desc,title,video)
}
......@@ -58,6 +60,7 @@ function section_four(val){ // load info for section two based on value
var desc = dictionary["ways_forward"][val][1];
var title = dictionary["ways_forward"][val][2];
var video = dictionary["ways_forward"][val][3];
selection_tracking[3] = title; // set value for export
open_modal()
set_modal_text(url,desc,title,video)
}
\ No newline at end of file
......@@ -104,7 +104,8 @@ function autocomplete(inp, arr, sub_dict) {
function createInfo(info_arr){
console.log(info_arr);
open_modal();
selection_tracking[0] = info_arr[2]; // set value for export
//open_modal();
}
function destroyInfo(){
console.log('No info')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment