I am trying to reload webpage using location.reload(). I would also like to pass variable to this. I tried below option and it didn’t work. Help plz?
location.reload(window.location.replace=("success.jsp?abc="+<%=processId%>));
I also tried directly using below code and it send the variable value. But after reloading the page, it didn’t put the grid values on the page.if I reload directly using location.reload(), it works. However, it is not passing the variable.
window.location.replace=(“grid.jsp?procid=”+<%=processId%>)
You can persist data across page reloads via something like
window.localStorage,window.sessionStorageor store values in cookies .Reference