Jump to content

Close a pop-up and reload parent window


Recommended Posts

I'm trying to use a version of this tech tip : http://howto.caspio.com/datapages/form-elements/dropdowns-and-listboxes/dynamically-adding-options-to-dropdowns-and-listboxes/#comment-733

The script in the tech tip is:

window.close();

if (window.opener && !window.opener.closed) {

window.opener.location.reload();

}

This script is supposed to close the popup window after form submission, AND reload the parent page. Currently, it closes the window, but does not reload the page. I've looked everywhere, and tried many things, but it still won't work.

Any ideas/scripts?

Link to comment
Share on other sites

  • 7 years later...

Hi @coderedkyle,

 

The script that was given on the article works fine. To properly test this feature you will need to deploy the original form and view it outside of Caspio Bridge. If not deployed, the popup window will appear, however, the original form will not refresh when a new item is submitted.

Sorry for the late response. :) 

 

Regards,

kristina

Link to comment
Share on other sites

  • 2 years later...

@Joemac, it looks like the article in that URL above was deleted and replaced with a new one.

https://howto.caspio.com/tech-tips-and-articles/advanced-customizations/automatically-add-options-to-dropdowns-and-listboxes/

There is a good description on how to get this going from that link. Make sure you are deploying your datapage before testing, as it won't work if you are using the 'Preview' option. 

Link to comment
Share on other sites

2 hours ago, Joemac said:

Ok I see. So if the pop up is a caspio link (and not embedded) this won’t work.  Right??  @kpcollier

No. You can use caspio links. You just can't test it within Caspio Bridge. You'll need to have both pages set to 'Deployed' and use the URL from the parent page (the one that has the link to the popup) in your web browser. Or, use the embed code and deploy it to your own webpage. 

What I meant is, if you are building the datapage and click on the 'Preview' button to view the datapage, it will not work. It has to be outside of the Caspio workstation. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
 Share

×
×
  • Create New...