我们中的大多数人都能够提交服务器停用请求表,除了一个由于弹出警报而无法提交请求表的人说“无效的用户数据,返回表单。”。我已经在组权限中仔细检查了计算机管理员,他已经有权提交请求。
这个 XmlUserInfo 标签的作用是显示和获取用户的信息,如 uid、姓名、联系人等。
<xml id="XmlUserInfo" src="http://USMDLCDOWW002.intranet.dow.com/common/components/userinfo/UserInfoXml.asp?UserID=me"> </xml>
然后在 html 的底部,他们得到特定的 xml 标签 uid(userid) 和 cn(contactname) 传递给 javascript 进行验证。这是这个例子,
<p>
Please verify the entries below before submitting your request.</p>
<!--<form action="<%=Application("GSDISMConfirmationPage")%>" method="POST" id="ISform" name="ISform" onsubmit="javascript: return validate();">-->
<form method="POST" id="ISform" name="ISform" onsubmit="javascript: return validate();">
<input type="hidden" name="Form_ID" id="Form_ID" value="08.01.8">
<input type="hidden" name="Form_Name" id="Form_Name" value="NEAt - Server Decommission">
<input type="hidden" name="Callback_Phone" id="Callback_Phone" value="NULL">
<input type="hidden" name="ISM_Class_ID" id="ISM_Class_ID" value="DOW42109" />
<input type="hidden" name="Case_Type" id="Case_Type" value="Request">
<input type="hidden" name="Level_1" id="Level_1" value="NEA">
<input type="hidden" name="Level_2" id="Level_2" value="Windows">
<input type="hidden" name="Level_3" id="Level_3" value="Server Decommission">
<input type="hidden" name="CC_List" id="CC_List" value="NULL">
<input type="hidden" name="More_Info_Value_1" id="More_Info_Value_1" value="<% =Request.Form("txtServName") %>">
<input type="hidden" name="More_Info_Tag_1" id="More_Info_Tag_1" value="PRI_SERVER">
<input type="hidden" name="More_Info_Value_2" id="More_Info_Value_2" value="NULL">
<input type="hidden" name="More_Info_Tag_2" id="More_Info_Tag_2" value="NULL">
<input type="hidden" name="More_Info_Value_3" id="More_Info_Value_3" value="NULL">
<input type="hidden" name="More_Info_Value_4" id="More_Info_Value_4" value="NULL">
<input type="hidden" name="More_Info_Value_5" id="More_Info_Value_5" value="NULL">
<input type="hidden" name="More_Info_Value_6" id="More_Info_Value_6" value="NULL">
<input type="hidden" name="More_Info_Value_7" id="More_Info_Value_7" value="NULL">
<input type="hidden" name="More_Info_Value_8" id="More_Info_Value_8" value="NULL">
<input type="hidden" name="More_Info_Value_9" id="More_Info_Value_9" value="NULL">
<input type="hidden" name="More_Info_Value_10" id="More_Info_Value_10" value="NULL">
<input type="hidden" name="More_Info_Value_11" id="More_Info_Value_11" value="NULL">
<input type="hidden" name="More_Info_Value_12" id="More_Info_Value_12" value="NULL">
<input type="hidden" name="More_Info_Value_13" id="More_Info_Value_13" value="NULL">
<input type="hidden" name="More_Info_Value_14" id="More_Info_Value_14" value="NULL">
<input type="hidden" name="More_Info_Value_15" id="More_Info_Value_15" value="NULL">
<input type="hidden" name="More_Info_Value_16" id="More_Info_Value_16" value="NULL">
<input type="hidden" name="More_Info_Value_17" id="More_Info_Value_17" value="NULL">
<input type="hidden" name="More_Info_Value_18" id="More_Info_Value_18" value="NULL">
<input type="hidden" name="More_Info_Value_19" id="More_Info_Value_19" value="NULL">
<input type="hidden" name="Needed_By_Date" id="Needed_By_Date" value="NULL">
<input type="hidden" name="Case_Notes" id="Case_Notes" value="
Server Decommission Request
Environment: <% Response.Write(Request.Form("cmbEnvironment")) %>
Server Type: <% Response.Write(Request.Form("cmbServerType")) %>
Server Name: <% Response.Write(Request.Form("txtServName")) %>
Notes and/or Special Instructions: <% Response.Write(Request.Form("txtNotes")) %>">
<input type="hidden" name="PreApprover_UserID" id="PreApprover_UserID" value="NULL">
<input type="hidden" name="Confirmation_String" id="Confirmation_String" value="NULL">
<input type="hidden" name="Display_Menu" id="Display_Menu" value="NULL">
<table style="display: none; border-collapse: collapse" bordercolor="#111111" cellpadding="0"
cellspacing="0" datasrc="#XmlUserInfo">
<tr>
<td>
<input type="hidden" datafld="cn" id="Contact_FullName" name="Contact_FullName">
<input type="hidden" datafld="uid" id="Contact_ID" name="Contact_ID">
<input type="hidden" datafld="telephoneNumber" name="Contact_Phone" id="Contact_Phone">
</td>
</tr>
</table>
Then pass Contact_FullName and Contact_ID to external JavaScript file to validate. If does not match, it will show popup message which it the problem,
function validate()
{
if (ISform.Form_ID)
{
if ((ISform.Contact_FullName.value == "")||(ISform.Contact_ID.value == ""))
{
alert("Invalid User Data, return to form.");
return (false);
}
}
else
{
if (ISform.txtServName.value == "")
{
ServerValues();
if (ISform.txtServName.value == "")
{
alert("Please enter a Server Name.");
ISform.txtServName.focus();
return (false);
}
}
}
}
His uid and contact name are not empty because it already there on XmlUserInfo which it suppose to get his uid and cn. It work for me and other people but it doesn't work on him.