my dog learned polymorphism
The moose likes HTML, CSS and JavaScript and the fly likes Html POST & GET Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Html POST & GET " Watch "Html POST & GET " New topic


ram ragu
Ranch Hand

Joined: Mar 12, 2002
Posts: 57
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"http://localhost:8080/examples/servlet/GenerateReport");
how to make the request as a POST when we open a new window?
anyidea how to do this
your help is highly appreciated!
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63858

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 you may be able to achieve what you need by not using 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.
[ May 03, 2002: Message edited by: Bear Bibeault ]

[Asking smart questions] [About Bear] [Books by Bear]
ram ragu
Ranch Hand

Joined: Mar 12, 2002
Posts: 57
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 !
Charlie Sturman
Ranch Hand

Joined: Apr 04, 2002
Posts: 112
1.create the window:
submitWindow = 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.
3.create a submit event:
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 ]
I agree. Here's the link:
subject: Html POST & GET
It's not a secret anymore!