Jump to content
  • 0

Page redirecting to another page inside the embedded frame


Berean

Question

I've deployed 2 datapages inside one webpage (I am using WIX as my hosted CMS) - one search form and one results form.  I've configured Caspio bridge to redirect the search form to a new page after form submission but this new page is the same page.  Purpose is to have the search form and results displayed simultaneously.

Problem:  The search form redirects to the results page WITHIN the embedded frame instead of opening a new page tab.

Would appreciate any help. Thank you.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Sure you can get iframe deploy code and add it to the footer of submission page (search page). Along with the source URL of the frame you need to pass all parameters to the frame:

 

<iframe name="Web_Order" title="Web_Order" src="https://b15.caspio.com/dp.asp?AppKey=c82222022027df1c5e22223e1&id=[@id]&Name=[@Name]&email=[@email]">Sorry, but your browser does not support frames.</iframe>

Link to comment
Share on other sites

  • 0

If you have a DataPage inside another DataPAge deployed as iFrame, and if you want the parent DP to be redirected to another URL, you should use the following code:
 

<script>
document.querySelector("iframe").addEventListener('load', function(e) {
    let iFrameButton = document.querySelector("iframe").contentWindow.document.querySelector("input[id^='Submit']");

    function f_redirect() {
        window.top.location.href = "https://www.caspio.com/";
    }
    iFrameButton.onclick = f_redirect;
});
</script>

image.png 

image.png

 

image.png

image.png

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
Answer this question...

×   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...