title: AWEBER javascript integration
body: <p>i have 2 raw aweber html code, they are in separate accounts. now i want to have 1 sign up form for this two raw codes. Means when someone sign up on my form, the email should the be saved on my two list. but i got problem on how to integrate this two codes. When i remove 1 form it work for only 1 list but when i integrate the two it doesn't save any email on the two list.</p>
  
  <p>heres my code ,sorry for my poor coding im new to javascript im trying hard to solved this problem hope someone can help me.</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  &lt;!--1st--&gt;
  &lt;script language="javascript"&gt;
  function copy_fields(){
      &lt;!--document.getElementById('name1').value = document.getElementById('name').value;
      document.getElementById('from1').value = document.getElementById('email').value;
  }
  function validate(){
      var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 
      if((document.submail.email.value=='')||(document.submail.email.value=='Email Address'))
      {alert('Please Enter Email Address'); return false;}
      if (!filter.test(document.submail.email.value)) 
      {alert('Please Enter A Valid Email'); return false;}    
  
      document.getElementById('sub9').className='gray_out';
      document.getElementById('sub9').disabled='true';    
  
      copy_fields();
      document.form2.submit();
      setTimeout('document.submail.submit()',3000);   
  }
  &lt;/script&gt;
  &lt;style type="text/css"&gt;
  .gray_out {
      filter:alpha(opacity=40);
      -moz-opacity:.40;
      opacity:.40;
  }
  &lt;/style&gt;
  &lt;!--END 1st--&gt;
  
  &lt;!--2nd--&gt;
  &lt;script language="javascript"&gt;
  function copy_fields1(){
      &lt;!--document.getElementById('name1').value = document.getElementById('name').value;
      document.getElementById('from1').value = document.getElementById('email').value;
  }
  function validate1(){
      var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 
      if((document.submail.email.value=='')||(document.submail.email.value=='Email Address'))
      {alert('Please Enter Email Address'); return false;}
      if (!filter.test(document.submail.email.value)) 
      {alert('Please Enter A Valid Email'); return false;}    
  
      document.getElementById('sub9').className='gray_out';
      document.getElementById('sub9').disabled='true';    
  
      copy_fields1();
      document.form1.submit();
      setTimeout('document.submail.submit()',3000);   
  
  }
  &lt;/script&gt;
  &lt;style type="text/css"&gt;
  .gray_out {
      filter:alpha(opacity=40);
      -moz-opacity:.40;
      opacity:.40;
  }
  &lt;/style&gt;
  &lt;!--END 2nd--&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;form name="submail" method="post" action="http://empowerauthoritypro.com/commission-loophole-ninja" &gt;
  &lt;input type="hidden" name="go" value="now" /&gt;
      &lt;!--    First Name:&lt;br /&gt;
          &lt;input id="name" type="text" name="name" value="First Name" onclick="if(this.value=='First Name') this.value=''" class="text-field" /&gt;&lt;br /&gt;--&gt;
          Email:&lt;br /&gt;
          &lt;input id="email" type="text" name="email" value="Email Address" onclick="if(this.value=='Email Address') this.value=''" class="text-field" /&gt;
          &lt;!--&lt;a href="#" onclick="return validate();" id="sub9"&gt;Optin Now&lt;/a&gt;--&gt;
          &lt;input type="button" id="sub9" value="Submit" onClick='window.open(validate1())' /&gt;
  &lt;/form&gt;
  
  
  
  &lt;!--1st has email requirement only--&gt;
  &lt;form name="form2" method="post" action="http://www.aweber.com/scripts/addlead.pl" target="iframe" style="display:none"&gt;
  &lt;input type="hidden" name="meta_web_form_id" value="1817364894" /&gt;
  &lt;input type="hidden" name="meta_split_id" value="" /&gt;
  &lt;input type="hidden" name="listname" value="dummylistshaq" /&gt;
  &lt;input type="hidden" name="redirect" value="http://www.aweber.com/thankyou.htm?m=default" /&gt;&lt;input type="hidden" name="meta_adtracking" value="ninjatest" /&gt;
  &lt;input type="hidden" name="meta_message" value="1" /&gt;
  &lt;input type="hidden" name="meta_required" value="email" /&gt;
  &lt;input type="hidden" name="meta_tooltip" value="" /&gt;
  &lt;div style="display:none"&gt;
  &lt;img src="http://forms.aweber.com/form/displays.htm?id=jByM7MxsLBycLA==" alt="" width="1" height="1" /&gt;
  &lt;/div&gt;
  &lt;input type="text" name="email" id="from1" value="" size="20"&gt;
  &lt;/form&gt;
  &lt;iframe name="iframe" style="display:none"&gt;&lt;/iframe&gt;
  &lt;!--END 1st--&gt;
  
  &lt;!--2nd has name and email requirement but i have compromise the name to be hide--&gt;
  &lt;form name="form1" method="post" action="http://www.aweber.com/scripts/addlead.pl" target="iframe" style="display:none"&gt;
  &lt;input type="hidden" name="meta_web_form_id" value="1376972149" /&gt;
  &lt;input type="hidden" name="meta_split_id" value="" /&gt;
  &lt;input type="hidden" name="listname" value="optinninja1" /&gt;
  &lt;input type="hidden" name="redirect" value="http://www.aweber.com/thankyou.htm?m=default" /&gt;&lt;input type="hidden" name="meta_adtracking" value="ninjaoptin" /&gt;&lt;input type="hidden" name="meta_message" value="1" /&gt;
  &lt;input type="hidden" name="meta_required" value="name,email" /&gt;
  &lt;input type="hidden" name="meta_tooltip" value="" /&gt;
  &lt;div style="display:none"&gt;
  &lt;img src="http://forms.aweber.com/form/displays.htm?id=jMzsbJzsTIwsnA==" alt="" width="1" height="1" /&gt;
  &lt;/div&gt;
  &lt;input type="hidden" name="name" id="name1" value="" size="20"&gt;
  &lt;input type="text" name="email" id="from1" value="" size="20"&gt;
  &lt;/form&gt;
  &lt;iframe name="iframe" style="display:none"&gt;&lt;/iframe&gt;
  &lt;!--END 2nd--&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>