javascript - Reuse the same popup window -


i looking use same pop window each time pop called. need form submit pop-up window, working fine, in chrome ios each time submit form opens new tab/window instead use previous one.

to resume want did jsfiddle: each time click submit button see new pop-up window opened instead use previous opened window.

http://jsfiddle.net/s5ph2rzy/

<input type="submit" onclick="mainvar.setformsubmit();" value="submit" /> var mainvar = {     setformsubmit: function() {        window.open('', 'formtarget','width=650, height=800');     } } 

i have found out info saying use same popup name, not work. found out page explains how http://www.codestore.net/store.nsf/unid/domm-4pyj3s?opendocument not work in jsfiddle neither. can me uptate jsfiddle workable code?

you need reuse window's name. in example, you've named window "formtarget".

you can this, example:

var popupwin = null; var mainvar = {     setformsubmit: function() {        popupwin = window.open('', 'formtarget','width=650, height=800');     } }  function openanotherlink(url) {      popupwin.location.href = url; } 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -