(www.aimeiba.org/blog韩威编写。)<%--
=================================================================
Licensed Materials - Property of IBM
WebSphere Commerce
(C) Copyright IBM Corp. 2011 All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or
disclosure restricted by GSA ADP Schedule Contract with
IBM Corp.
=================================================================
--%>
<!-- start leave.jsp -->
<br clear="all" />
<div>
<%
out.flush();
%> <c:import
url="${jspStoreDir}UserArea/AccountSection/ConsultationSubsection/ConsultationResultDisplay.jsp">
<c:param name="storeId" value="${WCParam.storeId}" />
<c:param name="catalogId" value="${catalogId}" />
<c:param name="langId" value="${catalogEntryID}" />
<c:param name="productID" value="${catalogEntryID}" />
</c:import> <%
out.flush();
%> <wcf:url var="LeaveWordsURL" value="UserLeave">
<wcf:param name="langId" value='${langId}' />
<wcf:param name="storeId" value='${WCParam.storeId}' />
<wcf:param name="catalogId" value='${WCParam.catalogId}' />
</wcf:url> <script type="text/javascript"
src="<c:out value="${jsAssetsDir}../comm/javascript/jquery.blockUI.js"/>"></script>
<script type="text/javascript">
function displayDiv(){
$.blockUI({
message: $('#leave'),
css: {
top: '50%',
left: '50%',
textAlign: 'left',
marginLeft: '-240px',
marginTop: '-145px',
width: '450px',
background:'#CCC'
}
});
$('.blockOverlay').click($.unblockUI);
$('.close').click($.unblockUI);
}
function submitForm()
{
var title= $("#leavetitle").val();
var content = $("#leaveContent").val();
var authorId = $("#authorId").val();
var catentryId =$("#catentryId").val();
if(title == "" || content=="")
{
alert("no null");
return false;
}
var params=
{
'title':title,
'leaveContent':content,
'authorId':catentryId,
'catentryId':catentryId
}
$.get('<c:out value='${LeaveWordsURL}'/>',params,function(data){
alert('<fmt:message key='LAVAE_MESSAGE_SUCCESS' bundle='${storeText}'></fmt:message>');
$('.blockOverlay').click($.unblockUI);
$('.close').click($.unblockUI);
document.getElementById("leave").style.display= 'none';
});
}
function close(){
alert("fffffffffff");
$('.blockOverlay').click($.unblockUI);
$('.close').click($.unblockUI);
document.getElementById("leave").style.display= 'none';
}
</script>
<div style="padding: 50px; display: none;" id="leave"><c:if
test="${userId !='-1002' }">
<a href="#" οnclick="close();return false;">close</a>
<p class="STYLE1"><fmt:message key="leve" bundle="${storeText}"></fmt:message></p>
<form method="get" name="leave"><fmt:message key="LEAVE_Titile"
bundle="${storeText}" />:<input name="title" type="text" size="40"
id="leavetitle" /> <br />
<fmt:message key="LEAVE_CONTENT" bundle="${storeText}"></fmt:message>:
<textarea name="leaveContent" cols="41" rows="10" wrap="physical"
id="leaveContent"></textarea>
</p>
<p><input type="hidden" name="authorId" value="-1000" id="authorId" />
<input type="hidden" name="catentryId" value="${catalogEntryID}"
id="catentryId" /></p>
<p><input type="submit" id="submit"
οnclick="submitForm();return false;" /> <input type="reset" /></p>
</form>
</c:if> <wcf:url var="LoginURL" value="AjaxLogonForm">
<wcf:param name="langId" value="${langId}" />
<wcf:param name="storeId" value="${WCParam.storeId}" />
<wcf:param name="catalogId" value="${WCParam.catalogId}" />
</wcf:url> <c:if test="${userId =='-1002' }">
<script type="text/javascript">
function validate(){
if(${userId =='-1002' }){
$('#nologin').innerHTML = "<a href='<c:out value= "${LoginURL}"/>'> <c:out value= "<fmt:message key='LEAVE' bundle='${storeText}' />"/></a>";
}
}
</script>
<fmt:message key="Please_LOGIN" bundle="${storeText}" />
<span id="nologin" style="color: #FF0000;">nn</span>
</c:if></div>
<span class="primary_button"> <span class="button_container">
<span class="button_bg"> <span class="button_top"> <span
class="button_bottom"> <a id="userleave" οnclick="displayDiv()">
<fmt:message key="MY_CONS_CONSULT" bundle="${storeText}" /></a> </span> </span> </span> </span> </span></div>
<!-- end leave.jsp -->