I have create one jsp
page which contain one html
form while submit
ting this form on that time i want to open it in new tab in same browser.
Asked
Active
Viewed 2.0k times
3

Luiggi Mendoza
- 85,076
- 16
- 154
- 332

Panchotiya Vipul
- 1,226
- 5
- 17
- 42
-
Do you want to get the response in the new tab/window? – Luiggi Mendoza Dec 10 '13 at 05:42
-
2possible duplicate : http://stackoverflow.com/questions/7231720/open-jsp-in-new-browsertab-from-serverside-code – Kamlesh Arya Dec 10 '13 at 05:43
-
target="_blank" Opens the linked document in a new window or tab – Krish R Dec 10 '13 at 05:43
-
`@Luiggi Mendoza` something like that... – Panchotiya Vipul Dec 10 '13 at 05:44
-
@KamleshArya while the concept in your possible dup is right, I doubt OP uses JSF. – Luiggi Mendoza Dec 10 '13 at 05:47
2 Answers
10
You can use :
<form method="post" target="_blank">
//Your other code
<input type="submit" name="btn_submit" id="btn_submit" value="Submit">
</form>
This will open page in new tab.
_blank
is used for that.
You can also visit this for more details about it.
**
OR
**
<input type="button" value="Open Window" onclick="window.open('http://www.domain.com')">
**
OR
**
onclick="window.location.href='http://www.domain.com/','_blank'";

Java Curious ღ
- 3,622
- 8
- 39
- 63
-
1Yes I know I have just gave him a basic skeleton or structure that how he can do that.. – Java Curious ღ Dec 10 '13 at 05:46
-
2Then please remove it because it may cause problems for future readers that don't understand this. – Luiggi Mendoza Dec 10 '13 at 05:47
0
try out this..
<form method="post" target="_blank">
// form input fields goes here...
<input type="submit" name="btnSubmit" id="btnSubmit" value="Submit">
</form>
Note: You can add action to form where you want to send your request.

Vijay
- 8,131
- 11
- 43
- 69