I am using this taglib : <%@ taglib prefix="sUrl" uri="http://www.emudhra.com/jsp/jstl/secureUrl" %>
我正在使用这个taglib:<%@ taglib prefix =“sUrl”uri =“http://www.emudhra.com/jsp/jstl/secureUrl”%>
And opening a popup window with few values passed :
并打开一个传递少量值的弹出窗口:
function editStatus(tranId,offerCode,userId){
will I be able to convert these values to java and assign them to param ??
我能将这些值转换为java并将它们分配给param吗?
var target = "<sUrl:url value='/admin/editStatusPopUp.htm' encryptionEnabled='true'><sUrl:param name='tranId' value='"+tranId+"'/> <sUrl:param name='offerCode' value='"+offerCode+"' /><sUrl:param name='userId' value='"+userId+"' /></sUrl:url>";
window.open(target,'SearchPopUpName' ,'toolbar=no,scrollbars=0,location=no,statusbar=0,menubar=0,resizable=no,width=350,height=170');
}
but whatever values I set to url param
it is not getting set exactly tranId,offerCode,userId
are not getting set and I get this kind when I see the server console :
但无论我设置为url param的值是什么,都没有设置完全tranId,offerCode,userId没有设置,当我看到服务器控制台时我得到这种:
tranId:"+tranId+"
offerCode:"+offerCode+"
userId:"+userId+"
How do I set values to param
?
如何设置值为param?
1 个解决方案
#1
0
If these values (tranId,offerCode,userId) are known to you before generating the page, then change all your
如果在生成页面之前您已知这些值(tranId,offerCode,userId),那么请更改所有值
value='"+tranId+"'/>
to
value='<%=tranId%>'/>
for each variable. But this effectively means your Javascript function will now be
对于每个变量。但这实际上意味着你的Javascript功能现在将是
function editStatus(){
#1
0
If these values (tranId,offerCode,userId) are known to you before generating the page, then change all your
如果在生成页面之前您已知这些值(tranId,offerCode,userId),那么请更改所有值
value='"+tranId+"'/>
to
value='<%=tranId%>'/>
for each variable. But this effectively means your Javascript function will now be
对于每个变量。但这实际上意味着你的Javascript功能现在将是
function editStatus(){