recipes-gsrd/socfpga-gsrd-webcontent/files/helper_script.js
// example code to call it - you may modify this as required
example code to call it - you may modify this as required
example code to call it - you may modify this as required
function start() {
   if (firstTime(thisPage())) {
	  if(typeof(Storage)!=="undefined"){}
	  else{ alert('Please use browser that support HTML5 to view this page.');}
   }
   document.getElementById("lightshow").value = sessionStorage.getItem("lightshow_text");
   document.getElementById("led0_id").value = sessionStorage.getItem("led0_text");
   document.getElementById("led1_id").value = sessionStorage.getItem("led1_text");
   document.getElementById("led2_id").value = sessionStorage.getItem("led2_text");
   document.getElementById("led3_id").value = sessionStorage.getItem("led3_text");
}
function start ( ) { if ( firstTime ( thisPage ( ) ) ) { if ( typeof ( Storage ) !== "undefined" ) { } else { alert ( 'Please use browser that support HTML5 to view this page.' ) ; } } document . getElementById ( "lightshow" ) . value = sessionStorage . getItem ( "lightshow_text" ) ; document . getElementById ( "led0_id" ) . value = sessionStorage . getItem ( "led0_text" ) ; document . getElementById ( "led1_id" ) . value = sessionStorage . getItem ( "led1_text" ) ; document . getElementById ( "led2_id" ) . value = sessionStorage . getItem ( "led2_text" ) ; document . getElementById ( "led3_id" ) . value = sessionStorage . getItem ( "led3_text" ) ; }
example code to call it - you may modify this as required
example code to call it - you may modify this as required
// this code only runs for first visit //check if local storage is supported by the browser // other code to run every time once page is loaded goes here