Gumbytie Posted October 13, 2009 Share Posted October 13, 2009 Architecture entails that this button resides in an iframe with job postings. When they wish to submit for the job, the submit button needs to take them out of the iframe into a new window. What I have now just opens the next form within the existing iframe. <input id="apply" name="apply" type="button" value="APPLY" onClick="location.href='ddform1.htm?apply='+escape('Digital Production Manager')" target="_blank" /> Now scrolling about here it looks like this should be a window.open so I tried modifying what I found here but I am obviously screwing up the syntax. Two different tries here: <input id="apply" name="apply" type="button" value="APPLY" onClick="window.open('http://www.bigalienhead.com/ddform1.htm?apply='+escape('Digital Production Manager')" target="_blank"> and/or <input id="apply" name="apply" type="button" value="APPLY" onclick="window.open(\'ddform1.htm?apply='+escape('Digital Production Manager')\'_blank\');" /> It is critical that I capture the data from the form and then submit. The ('Digital Production Manager') is the particular job they will be applying for. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/177511-submit-button-in-an-iframe-how-can-i-get-it-to-open-the-link-in-a-new-window/ Share on other sites More sharing options...
Psycho Posted October 13, 2009 Share Posted October 13, 2009 Give the form tag a target parameter. user "_blank" to open a new window each time they submit. <form target="_blank"> Or use a named widow to open all submissions in the same window. A new window window will be opened if it doesn't exist, but subsequent submissions will be opened in the same window. <form target="CustomWindowName"> Having named windows allows you to interact with that window from other pages if needed. For example, if you needed to close the opened window from the original page you could do it by referencing the named window. Quote Link to comment https://forums.phpfreaks.com/topic/177511-submit-button-in-an-iframe-how-can-i-get-it-to-open-the-link-in-a-new-window/#findComment-936189 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.