title: separate values of a textbox and place it on an array in javascript
body: <p>I have a textbox in which a user its going to input a value which I want to take and do the following. I want to be able to separate each word and add something to the end of them. so if they put 123. I want to separate it and make it 1.jpg, 2,jpg 3.jpg
  after they are separated i want to put it in an array to compare to another array and go from there.
  Here is what I got so far</p>
  
  <pre><code>&lt;input type="text" id="textfromuser" /&gt;
  &lt;script type = "text/javascript"&gt;
  function validate(){
  var lists = [];
  var VAlidation = document.getElementById("textfromuser").value;
  lists.push(VAlidation);
  for(var i=0; i&lt;lists.length; i++)
  alert(lists[i]).split('.');
  </code></pre>
  
  <p>this part of the code was to show that the value in the textbox is split and placed in an array but its not working.. any ideas?</p>