Hello! We can do a GET or POST from a FORM but I want to open a new window and inside that I want to run my servlet ... and it should be a POST in the form we give like this method="post" ACTION="http://localhost:8080/examples/servlet/GenerateReport" but I have to do the following myview=window.open("http://localhost:8080/examples/servlet/GenerateReport"); view.focus(); how to make the request as a POST when we open a new window? anyidea how to do this your help is highly appreciated! Ram
If you just want to open a new instance of the browser and not control what window decorations it has (via the 3rd parameter of window.open()) you may be able to achieve what you need by not using window.open() at all and by placing the following attribute on your <form> tag:
If that doesn't give you the amount of control that you need, please respond and maybe we can come up with something a bit more complex, but that could achieve your goal. hth, bear [ May 03, 2002: Message edited by: Bear Bibeault ]
Sorry! I can not use the TARGET Reason is I want to control the new popup window and the toolbar .. at the same time I will not be submitting the form ... instead I will use the OnClick function of the button which is available in the FORM submitRequest function will open a window and pass the url Kindly let me know !
1.create the window: submitWindow = window.open(... blank ) 2.create the form in the new window using document.write: submitWindow.document.write("html with the form tag ,atributes like method=post,action=servlethtml and form field tags and the values you want to send. submitWindow.document.close() 3.create a submit event: submitWindow.document.form.submit() btw: If you were using get you could just append the fields to the uri.I assume you knew that Here is an example similiar to what I am suggesting taken from an app I wrote:
[ May 04, 2002: Message edited by: Charlie Sturman ]