Below is the Javascript function call in which I am calling a struts action which in turn resolves to a jsp .In the Jsp page which is opened in a separate w开发者_如何学Pythonindow I have a form with a few text boxes and drop down and a submit button.When I submit the filled form I am unable to get all these form fields although those instance variables are defined in the action class.Is there something that i am missing here????
function editQuestions(val) {
window.open("fetchQuestionAction.action?"+
"quesId="+val,'mywindow','width=400,height=200');
}
For get the data in the new window you can:
- POST the data to the Different action that will put it to the session. Then open the window. The POST action should be done via AJAX to not reload the page unneccessary.
- Add the data from the Form fields to the query string for the URI for the window.open first parameter. Then you could use this data on the server to render the new page or just send it in hidden fields and use on the client.
Can you read the data from the form fields and append them as request params to the URL. This way the params should be available on the opened window.
精彩评论