【发布时间】:2015-08-12 20:09:38
【问题描述】:
我在form 中有一些hidden fields 没有在IE 中提交。但在 chrome 和 firefox 中运行良好。
Hidden field values 在提交时未出现在 Request 对象中。
HTML
<input type="hidden" name="IsRepeatCustomer" value="" />
<input type="hidden" name="LeadID" value=""/>
我在后面设置这些隐藏代码
代码
代码块 1
var bgColor = Convert.ToInt32(getLeads["NumSales"]) > 0 ? "#B3FFFF" : "#F5D0A9";
var isRepeatCustomer = Convert.ToInt32(getLeads["NumSales"]) > 0 ? "Y" : "N";
controlBuilder.Append("<tr bgcolor='" + bgColor + "'>");
controlBuilder.AppendFormat(@"<td><input type=submit name='submit' onFocus='LeadID.value ={0};IsRepeatCustomer.value=""{1}"";' value='Try This Duplicate' class='button-text' style='background-color: " + bgColor + "; width: 100%' /></td>", getLeads["LeadID"], isRepeatCustomer);
controlBuilder.AppendFormat("<td class='boldBodyText' nowrap='nowrap'>{0} </td>", getLeads["FirstName"]);
controlBuilder.AppendFormat("<td class='boldBodyText' nowrap='nowrap'>{0} </td>", getLeads["LastName"]);
controlBuilder.AppendFormat("<td class='boldBodyText' nowrap='nowrap'>{0} </td>", getLeads["Address"]);
controlBuilder.AppendFormat("<td class='boldBodyText' nowrap='nowrap'>{0} </td>", getLeads["Zip"]);
controlBuilder.AppendFormat("<td class='boldBodyText' nowrap='nowrap'>{0} </td>", getLeads["Phone"]);
controlBuilder.Append("</tr>");
所以我在提交按钮的焦点上设置 LeadID 和 IsRepeatCustomer 值。在 Chrome 和 FireFox 中运行良好。
我不确定如何让它在 IE 中运行。
代码块 2
private void TryThisDuplicate()
{
if (this.IsNewLead(Convert.ToInt32(Request["LeadID"]), Convert.ToInt32(SessionHelper.FirstUserSelectedStoreID)))
{
this.LoadQueueDataByDNIS();
var sourceAndBreakDown = QueueHelper.GetDefaultSourceAndBreakdown(m_Queue);
if (sourceAndBreakDown.Item1 != null && sourceAndBreakDown.Item2 != null)
{
this.UpdateLeadWithSourceAndSourceBreakDown(sourceAndBreakDown.Item1, sourceAndBreakDown.Item2, Convert.ToInt32(Request["LeadID"]), Convert.ToInt32(SessionHelper.FirstUserSelectedStoreID));
}
}
Response.Redirect("/Lead?L=" + Request["LeadID"] + "&SS=Y&P=ADDNEWLEAD&RepeatCustomer=" + Request["IsRepeatCustomer"]);
}
【问题讨论】:
-
您需要发布您的代码,否则我们无法帮助您。
标签: javascript html