未生成电子邮件或未启动脚本
Email not being generated or script not firing?
我有这项工作来生成电子邮件,但如果"ComplaintTextbox"包含超过30个字符,则电子邮件不会生成。??
<script type="text/javascript">
function sendMail(CustomerTextbox, AddressTextBox, CityTextBox, StateDropDown, ZipTextBox, ModelTextbox, SerialTextbox, ReferenceTextbox, ComplaintTextBox, WarrentyTextBox) {
var CustomerTextbox = document.getElementById(CustomerTextbox).value;
var AddressTextBox = document.getElementById(AddressTextBox).value;
var CityTextBox = document.getElementById(CityTextBox).value;
var StateDropDown = document.getElementById(StateDropDown).value;
var ZipTextBox = document.getElementById(ZipTextBox).value;
var ModelTextbox = document.getElementById(ModelTextbox).value;
var SerialTextbox = document.getElementById(SerialTextbox).value;
var ReferenceTextbox = document.getElementById(ReferenceTextbox).value;
var ComplaintTextBox = document.getElementById(ComplaintTextBox).value;
var WarrentyTextBox = document.getElementById(WarrentyTextBox).value;
var body = "Please issue a RMA for this case." + "'r'n";
body += CustomerTextbox + "'r'n";
body += AddressTextBox + "'r'n";
body += CityTextBox + "'r'n";
body += StateDropDown + "'r'n";
body += ZipTextBox + "'r'n";
body += ModelTextbox + "'r'n";
body += SerialTextbox + "'r'n";
body += ReferenceTextbox + "'r'n";
body += ComplaintTextBox + "'r'n";
body += WarrentyTextBox + "'r'n";
您不应该因此导致完全回发。您正试图用ASP.NET Submit按钮调用javascript函数,只需更改此
<a href="javascript:void(0)" onclick="sendMail('<%=CustomerTextbox.ClientID %>')">
<asp:Button ID="cmdEmail1" runat="server" Text="Generate Email RMA"
Width="158px" />
</a>
到此:
<a href="#" onclick="sendMail('<%=CustomerTextbox.ClientID %>')">
Generate Email RMA
</a>
将开始使您的web开发生活更加轻松和可扩展。
相关文章:
- chrome扩展:尽管运行了at:documentidle,js脚本还是过早启动
- 为什么我的控制器没有启动函数.js脚本
- 启动脚本中的 GATE -Dgate.plugins.home 选项
- 简单的按钮以快速启动脚本
- 在 MVC4 中注册启动脚本
- 如何在响应.redirect之前执行启动脚本
- 未生成电子邮件或未启动脚本
- 无法注册启动脚本
- 在启动脚本之前显示loading.gif
- 在滚动和最大宽度上启动脚本
- 节点在启动脚本上运行失败
- 如何在meteor mupx启动脚本中添加命令?
- 使用返回键启动脚本
- 瞄准类内部的类,启动脚本- Javascript/jQuery
- 是否有一种方法可以在ajax响应后启动脚本
- 我怎么能执行一些Javascript毕竟ASP.. NET启动脚本已执行
- 有一个NodeJS CLI的启动脚本
- InDesign启动脚本未从XML导入加载图像时出现问题
- Javascript 如何在确切的时间启动脚本
- 在控制器将数据发送到jsp之后,如何启动脚本