title: Popup form centered
body: <p>To be honest I don't know JavaScript at all. I've been getting by figuring out things by looking at others but not this time! I would like one of my forms to pop-up centered on submission. I have gotten it to pop-up and retain the form data so far but I cant seem to get it centered! Here is some of the code Im working with:</p>
  
  <p>Also if someone could explain this to me that would be great. My form action looks kinda crazy with the document.getElementByID('Name").vaule plus the email and so on but the form field ids don't match with the action but IT STILL WORKS. I have no clue about that one or why it actually works still. <a href="http://www.computerbytez.com/develop.html" rel="nofollow">http://www.computerbytez.com/develop.html</a> for the form in action!</p>
  
  <p>Form:</p>
  
  <pre><code>&lt;form action="https://computerbytez.com/InstantChat/Standard/logmein.html?Name=' + document.getElementById('Name').value + '&amp;amp;Email=' + document.getElementById('Name').value, '', 'toolbar=no, status=no, menubar=no, titlebar=no, location=no, scrollbars=no, resizable=no, height=500, width=400'" id="lmiform"&gt;
              &lt;div class="form-field"&gt;
          &lt;label class="cm-required   " for="elm_7"&gt;Name&lt;/label&gt; &lt;input class="input-text" id="elm_7" name="name" size="50" style="width: 100%; max-width: 372px;" type="text"/&gt;&lt;/div&gt;
  &lt;div class="buttons-container"&gt;
          &lt;span class="button-submit button-wrap-left"&gt;&lt;span class="button-submit button-wrap-right"&gt;&lt;input type="submit" value="Connect To Technician" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Form JavaScript:</p>
  
  <pre><code>$(document).ready(function() {
      $('#lmiform').submit(function() {
   window.open('', 'formpopup', 'width=620,height=480,scrollbars=no,resizable=no,top=200,left=200');
          this.target = 'formpopup';
      });
  });
  </code></pre>
  
  <p>I also have been messing with this (popup center for a link) and I've been trying to combined the two with no luck:</p>
  
  <pre><code>&lt;script&gt;
  function PopupCenter(pageURL, title,w,h) {
  var left = (screen.width/2)-(w/2);
  var top = (screen.height/2)-(h/2);
  var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
  } 
  &lt;/script&gt;
  
  &lt;a href="javascript:void(0);" onclick="PopupCenter('example.html', 'myPop1',620,470);"&gt;&lt;img alt="" class="LMIpic" src="live_help_online.gif" /&gt; &lt;/a&gt;
  </code></pre>
  
  <p>Any help would be greatly appreciated. Thanks</p>