title: how to make alert prompt only display once?
body: <p>I just want the alert apear once. </p>
  
  <pre><code>&lt;head&gt;
      &lt;script type="text/javascript"&gt;
      var name;
      name = window.prompt("Enter name");
      &lt;/script&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>this is in the body</p>
  
  <pre><code>&lt;div style="left:750px;top:60px;position:absolute;"&gt;
      &lt;script type="text/javascript"&gt;
          document.writeln("Welcome "+name+" !");  //name from the request will be display here
      &lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>==================================================================================</p>
  
  <p>also for the promotion which is popup always when page load</p>
  
  <p>here are for the promotion.html</p>
  
  <pre><code>&lt;body&gt;
  &lt;script type="text/javascript"&gt;
   PopupCenter()  //for name to be enter on request form
  &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>here are the promotion.html:-</p>
  
  <pre><code>&lt;body&gt;
  
  
       &lt;div id="promotion"&gt;
       &lt;table border="1"&gt;     
              &lt;tr&gt;&lt;td&gt;&lt;p&gt;
              &lt;script language="JavaScript"&gt;
                  &lt;!--
                  promo = new Array
                  promo[1]="PROMOTION!!! save up to 50% if you buy more than $300"
                  promo[2]="Open every monday to saturday!!!! from 9 a.m to 10 p.m"
                  promo[3]="The 100th customer will win free reel &amp; spool!!"
                  promo[4]="Labour sale day 20% off!! Labour sale day 20% off!!"
                  promo[5]="Custom parts and reels bearing will be 10% off!!!"
                  promo[6]="Come NOW!! HURRY!! while promotion still available!!"
                  promo[7]="Shimano from $230, NOWW ONLY $98!!!"
  
                  random_num = (Math.round((Math.random()*6)+1))
  
                  document.write(promo[random_num]);
                  --&gt;
                  &lt;/script&gt;
              &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;           
       &lt;/table&gt;
       &lt;/div&gt;
  
  
  
      &lt;/body&gt;
  </code></pre>
  
  <p>in this .js file are for promotion.html</p>
  
  <pre><code> function PopupCenter(pageURL, title,w,h) {
          var left = (screen.width/2)-(w/2);
          var top = (screen.height/2)-(h/2);
          var targetWin = window.open ("promotion.html", "PROMOTION", 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width='+580+', height='+485+', top='+100+', left='+400);
  
          } 
          return sessionStorage.Popupccenter=1;
  </code></pre>