Jump to content

Submit button in an IFrame, how can I get it to open the link in a new window


Gumbytie

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.