Jump to content

Direct to url from popup closing


Recommended Posts

I've modified a Submit form datapage (accessed as a popup in a Fancy Box from a Tabular datapage) that normally closes and refreshes it's parent page (the tabular datapage). 

This is the code in the Destination section of the Submission datapage:

<script>
setTimeout(function(){ window.parent.location.reload();window.parent.jQuery.fancybox.close();}, 2000);
</script>

On the new Submit datapage I need it to go to a defined url (with parameters passed) but cannot get the code to work. I'm using:

setTimeout(function(){ window.parent.location.href='../my-webpage?PID=[@field:PID]&PTID=[@field:PTID]'();window.parent.jQuery.fancybox.close();}, 2000);

Does anyone know how to modify the second code so it directs to 'my-webpage' and also still closes the fancybox? Many thanks- 

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...
×
×
  • Create New...