I have a form with a target = _blank set up, which works as intended, but I am looking to make the submit form opens on the same window don't matter how munch submit I do. Does it make sense?, example:
Current behavior is:
Behavior I need:
I did this jsfiddle http://jsfiddle.net/5jmnk1rm/
<form action="/" method="post" id="form1" target="_blank">
<input type="submit" value="Submit" />
</form>
Note: I should not use window.open (due other codes, etc...)
Update
I've changed the target="_blank" to target="customName" and it opens different windows in Chrome mobile (iOS). I am starting to think it is a bug on the browser
All you need to do is replace _blank with a specific name.
<form action="/" method="post" id="form1" target="foo">
<input type="submit" value="Submit" />
</form>
However you are in for some other complications like, the fact that some browser will open a new tab, instead of a window.
Additional Info
If you need to force opening in a new window regardless of how the user's browser is configured, you will have no choice but to use window.open. By setting the height and width options, you can force a window to open, not a tab.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With