Dotnetnuke 用Javascript发送电子邮件
你能告诉我吗 为什么我无法将表单数据发送到邮件id。下面是我的代码。 我在Dotnetnuke HTML/文本模块中使用了这段代码Dotnetnuke 用Javascript发送电子邮件,dotnetnuke,Dotnetnuke,你能告诉我吗 为什么我无法将表单数据发送到邮件id。下面是我的代码。 我在Dotnetnuke HTML/文本模块中使用了这段代码 <h3>To join the SoTeC email announcement list, fill out the form below.</h3> <p> </p> <p> </p> <p><style type="text/css"&
<h3>To join the SoTeC email announcement list, fill out the form below.</h3> <p> </p> <p> </p> <p><style type="text/css"> .link, .signupframe {
color: #226699;
font-family: Arial, Helvetica, sans-serif;
}
.link {
text-decoration: none;
}
.signupframe {
border: 1px solid #000000;
background: #ffffff;
}</style></p> <form id="icpsignup12374" method="post" action="mailto:your@domian.com" onsubmit="return verifyRequired12374();" accept-charset="UTF-8" name="icpsignup">
<input type="hidden" name="redirect" value="http://www.icontact.com/www/signup/thanks.html" /> <input type="hidden" name="errorredirect" value="http://www.icontact.com/www/signup/error.html" />
<div id="SignUp">
<table class="signupframe" border="0" cellspacing="0" cellpadding="5" width="260">
<tbody>
<tr>
<td valign="top" align="right"><font size="2">First Name</font></td>
<td align="left"><input name="fields_fname" type="text" /></td>
</tr>
<tr>
<td valign="top" align="right"><font size="2">Last Name</font></td>
<td align="left"><input name="fields_lname" type="text" /></td>
</tr>
<tr>
<td valign="top" align="right"><font size="1" face="Arial,Helvetica, sans-serif">*</font> <font size="2">Email</font></td>
<td align="left"><input name="fields_email" type="text" /></td>
</tr>
<tr>
<td> </td>
<td><font size="1">*</font><font size="2"> = Required Field</font></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Submit" /></td>
</tr>
</tbody>
</table>
</div> </form> <script type="text/javascript"> var icpForm12374 = document.getElementById('icpsignup12374'); if (document.location.protocol === "https:")
icpForm12374.action ="mailto:your@domian.com"; function verifyRequired12374() { if (icpForm12374["fields_email"].value == "") {
icpForm12374["fields_email"].focus();
alert("The Email field is required.");
return false; }
return true; } </script> <p><a class="link" href="http://www.icontact.com"><font size="2">Email Marketing You Can Trust</font></a></p>
要加入SoTeC电子邮件公告列表,请填写以下表格 和#160 .link、.signupframe{
颜色:#226699;
字体系列:Arial、Helvetica、无衬线字体;
}
.链接{
文字装饰:无;
}
.注册框架{
边框:1px实心#000000;
背景:#ffffff;
}
名字
姓
*电子邮件
*=必填字段
var icpForm12374=document.getElementById('icpsignup12374');如果(document.location.protocol==“https:”)
icpForm12374.action=“mailto:your@domian.com"; 函数verifyRequired12374(){if(icpForm12374[“字段\电子邮件”]。值=“”){
icpForm12374[“字段\电子邮件”].focus();
警报(“电子邮件字段为必填项”);
返回false;}
返回true;}
**因为不允许嵌套表单。DNN是一个ASP.NET WebForms应用程序,因此已经将所有内容包装在一个表单中。当您将表单添加到Text/HTML模块时,该代码将被放置在已经存在的表单中,这是不允许的。您有几个选择: 1) 您可以将表单代码放在HTML文件中,然后在IFrame中引用该文件 2) 您可以使用许多DNN表单模块中的一个重新创建表单。核心包括用于基本表单的表单和列表模块。还有许多其他形式的模块,它们的复杂性各不相同 3) 您可以创建一个新的自定义模块,该模块使用AJAX重新创建表单并执行post
看起来我们的邮件列表订阅模块可能会做一些轻微的修改来满足您的需要。- 你认为它会怎样工作?