Commit 329cf23d authored by Porter Libby's avatar Porter Libby
Browse files

fix no select

parent 78d4292c
......@@ -213,9 +213,10 @@
<div class='block' id="block5">
<span class='section-prompt'>5. Done!</span>
<br>
<a id='email_out' href=''>Send Email</a>
<div class='inner-nav'> <!-- Nav options for this block -->
<button id='email_out' onclick="export_email()" type="button" class="btn btn-labeled btn-dark btn-finish">
<span class="btn-label"><i class="fa fa-envelope"></i></span><br> Send Results as Email</button>
<button type="button" class="btn btn-labeled btn-dark btn-finish">
<span class="btn-label"><i class="fa fa-check"></i></span><br> Finish and see results!</button>
......
// GLOBALS
var email_href = "#";
var email_href = "";
var selection_tracking = ["","","",""];
var color_rotate = 0; // controls which color will be used first
......@@ -31,11 +31,20 @@ function create_email_href(){
var email_elem = document.getElementById('email_out');
email_elem.href = email_href;
return true;
}else{
console.log("selection incomplete");
return false;
}
}
function export_email(){
if (create_email_href()){
window.location.href = email_href;
}
else{
alert("Please make a selection for each section to export your results!");
}
}
......
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