Put one site inside another as checkout light box

3

I'm a web developer and I came across a problem where I need to display a registration form inside another page. The client does not want your user to be directed to our page, I have tried to instruct him to use iframe, but this has resulted in a horrible mobile experience. There are examples that can do exactly what I want most outside that are developed in javascript I do not quite understand how they work and I could not find search terms to do something similar, just looking at their code makes it difficult to understand because they are possibly minified with webpack or gulp.

Here are some examples:

link

or

link

or

link

My client in the case would follow the same examples, where I would put a script tag and the dependency data, thus opening a modal where the content that is inside would be controlled by my site giving an user experience of a distributed system that does not changes site. I know I did not post an error or code and I'm not asking for a code made rather a directed how to do something similar.

    
asked by anonymous 23.03.2018 / 20:40

1 answer

0

I tried in a way that might work but I'm not sure it will work 100% because certain plugins may not load

<div id="load"></div>

    $(document).ready(function(){
        $("#load").load("https://www.famalicaocanal.pt");
    })
</script>

In this example you can display that site on your page only if you have the following code at the top of the page on the site you want to display

 header("Access-Control-Allow-Origin: *");

Feel free to experiment with this url of the site.

    
23.03.2018 / 21:59