Suppose
home.jsp code contain a button like
<input name="R" onclick="del(<%=rs.getString("VDB")%>)" type="radio" value="<%=rs.getString("VDB")%>" />
// note : i am passing value of VDB in del()
it is calling javascript as :
<script type="text/javascript">
function del(delno)
{
var ff = document.vendorform;
var url = "delete.jsp?+vendor="+delno;
window.navigate("delete_vendor.jsp?+vendor="+delno);
//window.location.href="delete_vendor.jsp?+vendor="+delno;
//ff.method = "POST";
//ff.action ="delete_vendor.jsp?+vendor="+delno;
//ff.submit();
}//i have used 3 methods to redirect to delete.jsp
delete.jsp :
on this page i want to retrieve value of i used : 价值:
String D1=request.getParameter("vendor");
But getting null value.
Any help
var url = "delete.jsp?+vendor="+delno;
you have inserted wrong string +vendor
. it should be only vendor
in url.
var url = "delete.jsp?vendor="+delno;
Remove the "+" before the word vendor. Change
var url = "delete.jsp?+vendor="+delno;
To
var url = "delete.jsp?vendor="+delno;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.