Okay, so I want to take the functionality and look of the form on this page (
) and put it into the news bar of the homepage
http://spottedhorsevineyards.com
Here is the code that I extracted the form code from the mailer page.
Code:
Subscribe to one or more of our newsletters using the form below
<br/><font class="required">required field</font><br/>
<script language="Javascript" type="text/javascript">
function checkform() {
for (i=0;i<fieldstocheck.length;i++) {
if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].value") == "") {
alert("Please enter your "+fieldnames[i]);
eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()");
return false;
}
}
if(! compareEmail())
{
alert("Email Addresses you entered do not match");
return false;
}
return true;
}
var fieldstocheck = new Array();
var fieldnames = new Array();
function addFieldToCheck(value,name) {
fieldstocheck[fieldstocheck.length] = value;
fieldnames[fieldnames.length] = name;
}
function compareEmail()
{
return (document.subscribeform.elements["email"].value == document.subscribeform.elements["emailconfirm"].value);
}
</script><form method=post name="subscribeform"><table border=0>
<tr><td><div class="required">Email</div></td>
<td class="attributeinput"><input type=text name=email value="" size="40">
<script language="Javascript" type="text/javascript">addFieldToCheck("email","Email");</script></td></tr>
<tr><td><div class="required">Confirm email</div></td>
<td class="attributeinput"><input type=text name=emailconfirm value="" size="40">
<script language="Javascript" type="text/javascript">addFieldToCheck("emailconfirm","Confirm email");</script></td></tr><tr><td colspan=2>
<span class="attributeinput"><input type=checkbox name="htmlemail" value="1" /></span>
<span class="attributename">I prefer to receive emails in HTML format</span></td></tr>
</table><input type="hidden" name="list[1]" value="signup"><input type="hidden" name="listname[1]" value="News"/><div style="display:none"><input type="text" name="VerificationCodeX" value="" size="20"></div><p><input type=submit name="subscribe" value="Subscribe" onClick="return checkform();"></p>
</form><br/><br/>
And this is the code that I want to insert it into
Code:
<td id="vline6">
<br></td>
<td id="vline7">
<br></td>
<td class="l_news" id="l_news"><h1>Latest News </h1>
<p class="style3">Thursday, Febuary 28th, 2007 </p>
<p> </p>
<h2 class="style4">Great News!</h2>
<p>
<br>We finally got the last papers we needed to in order to sell our wine. Therefore, we can now sell our wine. If you have any further questions, please contact someone from Spotted Horse with any further questions. <font color ="#ffffff"><a href="contact_us.php">Contact Page</a></font>. </br>Thanks again!</br>~Spotted Horse Admin </p>
<p> </p>
<h2> </h2></td></tr>
<tr>
<td id="hline3" colspan="2">
<br></td>
<td id="hline4" colspan="2">
<br></td></tr>
<tr>
<td id="hline5" colspan="2">
<br></td>
<td id="hline6" colspan="2">
</table>
<!-- news.html -->
I just inserted the form code into my news bar, and it looked the same, but it didn't actually add the name to the mailer list.
HELP!