title: Accesing input element with javascript
body: <p>I'm not experienced with Javascript so any help would be very appriciated. For you guys this should be very easy. I posted a lot of code but my problem is just to copy 3 input fields values into a string/variable and use it for geocoding.</p>
  
  <p>I have this inputs in a table:</p>
  
  <pre><code>&lt;table width="580px" cellpadding="0" cellspacing="0"&gt;
  &lt;tr&gt;
  &lt;td width="290"&gt;&lt;label for="street"&gt;Street:&lt;/label&gt;&lt;/td&gt;
  &lt;td width="278"&gt;&lt;INPUT type="text" name="obj_object_description_street" id="obj_object_description_street" class="inputField" autocomplete="off" /&gt;&lt;/td&gt;
  &lt;td width="12"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td width="290"&gt;&lt;label for="streetno"&gt;House number:&lt;/label&gt;&lt;/td&gt;
  &lt;td width="290"&gt;&lt;INPUT type="text" name="obj_object_description_streetno" id="obj_object_description_streetno" class="inputField" autocomplete="off" /&gt;&lt;/td&gt;
  &lt;td width="12"&gt;&amp;nbsp;&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr&gt;
  &lt;td width="290"&gt;&lt;label for="zipcode"&gt;Post number:* &lt;/label&gt;&lt;/td&gt;
  &lt;td width="290"&gt;&lt;INPUT type="text" name="obj_object_description_zipcode" id="obj_object_description_zipcode" class="inputField" autocomplete="off" /&gt;&lt;INPUT TYPE="hidden" name="sys_area_node_id" /&gt;&lt;/td&gt;
  &lt;td width="12"&gt;&lt;img src="/img/info.gif" alt="info" width="12" height="11" border="0" onclick="show_info(this,8);" onmouseover="make_pointer();" onmouseout="del_pointer();" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>And this code to display a google map with dragable pin:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
   var geox='&lt;%obj_object_description_geox%&gt;';  //Location from DB
   var geoy='&lt;%obj_object_description_geoy%&gt;';  //Location from DB
   var sgeox='&lt;%sys_area_geox%&gt;';
   var sgeoy='&lt;%sys_area_geoy%&gt;';
   var telefon = "&lt;%adv_advertiser_phone%&gt;";
   var slika = "&lt;%main_media_web_url%&gt;";
   var povrsina = "&lt;%area%&gt;";
   var cijena = "&lt;%price_str%&gt;";
   var naslov = '&lt;%headline%&gt;';
   var posta = "&lt;%obj_object_description_zipcode%&gt;";
   var ulica = "&lt;%obj_object_description_street%&gt;";
   var broj =  "&lt;%obj_object_description_streetno%&gt;"; 
   var address = "";
  
  
  function initialize_map(){
    if(geox != 0 &amp;&amp; geoy != 0) //we have gps
    { 
      var myLatlng = new google.maps.LatLng(geox, geoy);  
      show_map(myLatlng);
    }
    else if(sgeox!=0 &amp;&amp; sgeoy !=0)
    {
       var myLatlng = new google.maps.LatLng(sgeox, sgeoy);
       show_map(myLatlng);
    }
    else //no? we do the old good geocoding
    {
  
      var geocoder = new google.maps.Geocoder();
      geocoder.geocode( {'address': '&lt;%bc_sys_area_name%&gt;, &lt;%bc_sys_area_name_2%&gt;'}, function(results, status) {
      if (status == google.maps.GeocoderStatus.OK) {
  
             show_map(results[0].geometry.location);
      } else {
              alert('Geocode was not successful for the following reason: ' + status);
       }
      });
  
  
    } 
  }
  
  
  
  &lt;/script&gt;
  </code></pre>
  
  <p>My problem is :</p>
  
  <pre><code> var geocoder = new google.maps.Geocoder();
      geocoder.geocode( {'address': '&lt;%bc_sys_area_name%&gt;, &lt;%bc_sys_area_name_2%&gt;'}, function(results, status) 
  </code></pre>
  
  <p>I dont want to geocode &lt;%bc_sys_area_name%>, &lt;%bc_sys_area_name_2%> from the database. I want to geocode with a combined data of inputs(Street + House number + Post number).
  Street has name &amp; id obj_object_description_street
  House has name &amp; id obj_object_description_streetno
  Post number has name &amp; id obj_object_description_zipcode.</p>
  
  <p>I have made a function that put's together all this 3 values:
  UPDATED:
  My problem is that i use this function for copying 3 inputs in a input with id="geocomplete" and I need this function to copy this values onload(when the page opens/refreshes) to an input  not just when i type(keyup event). </p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  
  $('#obj_object_description_street, #obj_object_description_streetno, #obj_object_description_zipcode').bind('keypress blur', function() {
  
      $('#geocomplete').val($('#obj_object_description_street').val() + ' ' +
                               $('#obj_object_description_streetno').val() + ' ' +
                               $('#obj_object_description_zipcode').val() );
  
  });
  
  
      &lt;/script&gt;
  </code></pre>
  
  <p>But I dont know how to put all this 3 data into a string/variable and put it in </p>
  
  <pre><code>geocoder.geocode( {'address': 'HERE IT SHOULD BE'}, function(results, status) {
      if (status == google.maps.GeocoderStatus.OK) {
  </code></pre>