javascript - Make that target="_blank" open always in the same window (not parent window) -
i have form target = _blank set up, works intended, looking make submit form opens on same window don't matter how munch submit do. make sense?, example:
current behavior is:
- "parent window" has form
- when submit first time second window opened, let called "window child 1" (until here fine)
- when submit form second time child window loaded (i don't want this)
behavior need:
- when submit form second time need content on same window first submit used "window child 1". doing overwrite result of first submit second 1 on same window.
i did jsfiddle http://jsfiddle.net/5jmnk1rm/
<form action="/" method="post" id="form1" target="_blank"> <input type="submit" value="submit" /> </form> note: should not use window.open (due other codes, etc...)
update
i've changed target="_blank" target="customname" , opens different windows in chrome mobile (ios). starting think bug on browser
all need replace _blank specific name.
<form action="/" method="post" id="form1" target="foo"> <input type="submit" value="submit" /> </form> however in other complications like, fact browser open new tab, instead of window.
additional info
if need force opening in new window regardless of how user's browser configured, have no choice use window.open. setting height , width options, can force window open, not tab.
Comments
Post a Comment