Variables 1 Text Entry Thoughts 1 Thoughts 2
Variables 1. Text Entry • Thoughts 1 • Thoughts 2 • Thoughts 3 • Notes • Email 2. Printout Title 3. System Date
Java. Script for Email var player = Get. Player(); var useremail=player. Get. Var("email"); var subject="Corporate Responsibility"; var usernotes=player. Get. Var("notes"); var exercisenotes 1=player. Get. Var("Thoughts 1"); var exercisenotes 2=player. Get. Var("Thoughts 2"); var exercisenotes 3=player. Get. Var("Thoughts 3"); var mailto_link='mailto: '+useremail+'? subject='+subject+'&body= '+"Activity Notes - My thoughts on the Non-Discrimination policy: %0 d%0 A“ +exercisenotes 1+"%0 d%0 A Activity Notes - Situations I would report to the Values Line: %0 d%0 A“ +exercisenotes 2+"%0 d%0 A Activity Notes - Examples of Conflict of Interest situations: %0 d%0 A“ +exercisenotes 3+"%0 d%0 AGeneral Notes: %0 d%0 A"+usernotes; win=window. open(mailto_link, 'email. Win');
Java. Script for System Date var d = new Date(); var weekday=new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); var month. Name=new Array("January", "February", "March", "April", "May", "June", "July", "August", "Septemeber", "October", "November", "December"); var date. Val=d. get. Date(). to. String(); var delimeter=", "; var delimeter 1=" "; var txt. Postdate="" var l. Digit=date. Val. char. At( date. Val. length-1); if (l. Digit=="1"){ txt. Postdate="st"; }else if(l. Digit=="2"){ txt. Postdate="nd"; }else if(l. Digit=="3"){ txt. Postdate="rd"; }else{ txt. Postdate="th"; } var date. String=weekday[d. get. Day()]+delimeter+month. Name[(d. get. Month())]+delimeter 1+date. Val+txt. Postdate+deli meter+d. get. Full. Year(); var player = Get. Player(); player. Set. Var("System. Date", date. String);
Java. Script for Printout var my. Window = window. open("", "Print", "width=810, height=610, scrollbars=1, resizable=1"); var player=Get. Player(); var headline=player. Get. Var("Print. Title"); var date=player. Get. Var("System. Date"); var usernotes=player. Get. Var("notes"); var exercisenotes 1=player. Get. Var("Thoughts 1"); var exercisenotes 2=player. Get. Var("Thoughts 2"); var exercisenotes 3=player. Get. Var("Thoughts 3"); var contents = "<html><head></head><body style='width: 650 px; padding: 20 px; '>" contents += "<div style='height: 20 px; padding: 10 px; margin-bottom: 20 px; text-align: center; '><button onclick='javascript: window. print(); '>Print My Notes</button></div>"; contents+="<div style='font-size: 22 px; font-weight: bold; margin-top: 20 px; marginbottom: 20 px; '>"+headline+"</div>"; contents+="<div style='font-size: 16 px; '>"+date+"</div>"; contents+="<div style='font-size: 18 px; font-weight: bold; margin-top: 10 px; '>Activity Notes - My thoughts on Non-Discrimination</div>"; contents+="<div style='font-size: 17 px; margin-top: 5 px; '>"+exercisenotes 1+"</div>"; contents+="<div style='font-size: 18 px; font-weight: bold; margin-top: 10 px; '>Activity Notes - Situations I would report to the Values Line</div>"; contents+="<div style='font-size: 17 px; margin-top: 5 px; '>"+exercisenotes 2+"</div>"; contents+="<div style='font-size: 18 px; font-weight: bold; margin-top: 10 px; '>Activity Notes - Examples of Conflict of Interest</div>"; contents+="<div style='font-size: 17 px; margin-top: 5 px; '>"+exercisenotes 3+"</div>"; contents+="<div style='font-size: 18 px; font-weight: bold; margin-top: 10 px; '>General Notes</div>"; contents+="<div style='font-size: 17 px; margin-top: 5 px; '>"+usernotes+"</div>"; contents+= "</body></html>" my. Window. document. write(contents);
- Slides: 4