title: window.location not working by using get element by id
body: <p>Hello i'm here with a new question in following code ,in below code <code>window.location</code> is not working, though <code>window.alert</code> is working perfect showing my desired url and value of <code>emailid</code> for which im writing this code. A Little help needed,I im new in this field.Your little help would make me learn better.Thanks in advance.</p>
  
  <pre><code>&lt;html&gt; 
  &lt;form&gt; 
  &lt;input id="c" type="hidden" value="http://mydomain.com"/&gt;
  &lt;input id="d" type="hidden" value="/somefile.php?emailid=/&gt; 
  &lt;h5&gt;Your Email adress&lt;/h5&gt;
  &lt;br&gt;
  &lt;input id="e" type="text"&gt;&lt;br&gt;
  &lt;input type="button" value="submit" onclick="display_alert();" /&gt; 
  &lt;/form&gt;
  &lt;script lang="javascript"&gt; 
  function display_alert() 
  { var dn = document.getElementById('d'); var cn = document.getElementById('c'); 
    var fn = document.getElementById('a');
    var ln = document.getElementById('e'); }
   location = "cn.value + dn.value + ln.value";
   &lt;/script&gt; 
   &lt;/html&gt;
  </code></pre>